<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Pull data from public\private domain using Proc http with API token on windows platform in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Pull-data-from-public-private-domain-using-Proc-http-with-API/m-p/751061#M236361</link>
    <description>&lt;P&gt;I'm not sure that you need to use "IN".&amp;nbsp; But my experience is limited with this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename my_out "ebyyc88ret54";     *.csv dataset name in that url;
options validmemname=extend;

proc http
url = "https://www.w3schools.com/python/pandas/data.csv"
out= my_out

method="GET"
headerin=headers
;
run;

 data "a look into"n;
   infile my_out obs=5;
   input;
   infile=_Infile_;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Jun 2021 20:44:43 GMT</pubDate>
    <dc:creator>PhilC</dc:creator>
    <dc:date>2021-06-29T20:44:43Z</dc:date>
    <item>
      <title>Pull data from public\private domain using Proc http with API token on windows platform</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pull-data-from-public-private-domain-using-Proc-http-with-API/m-p/751056#M236357</link>
      <description>&lt;P&gt;I am using base sas on windows platform, I have 2 .csv files that I need to read from the url and save them to my desktop using &lt;STRONG&gt;API token&lt;/STRONG&gt;.. CSV file has headers..&lt;/P&gt;
&lt;P&gt;In the code below, I am trying to read one .csv file. Is there a specific order to pass these parameters?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let mytoken =yyyyyyy;&lt;/P&gt;
&lt;P&gt;filename my_in1 "ebyyc88ret54";&amp;nbsp; &amp;nbsp; &amp;nbsp;*.csv dataset name in that url;&lt;/P&gt;
&lt;P&gt;proc http&lt;BR /&gt;url = "&lt;A href="https://yyyy.yy/proxy/api/dataproxy/datasets/" target="_blank"&gt;https://yyyy.yy/proxy/api/dataproxy/datasets/&lt;/A&gt;"&lt;BR /&gt;in= my_in1&lt;BR /&gt;out= my_out&lt;/P&gt;
&lt;P&gt;method="GET"&lt;BR /&gt;headerin=headers&lt;BR /&gt;oauth_bearer = &amp;amp;mytoken.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;I am getting the following error ( Iguess the system is checking for the my_in1 on my c drive instead of the URL..&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ERROR: Physical file does not exist,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;C:\temp\ebyyc88ret54&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 20:19:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pull-data-from-public-private-domain-using-Proc-http-with-API/m-p/751056#M236357</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2021-06-29T20:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pull data from public\private domain using Proc http with API token on windows platform</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pull-data-from-public-private-domain-using-Proc-http-with-API/m-p/751061#M236361</link>
      <description>&lt;P&gt;I'm not sure that you need to use "IN".&amp;nbsp; But my experience is limited with this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename my_out "ebyyc88ret54";     *.csv dataset name in that url;
options validmemname=extend;

proc http
url = "https://www.w3schools.com/python/pandas/data.csv"
out= my_out

method="GET"
headerin=headers
;
run;

 data "a look into"n;
   infile my_out obs=5;
   input;
   infile=_Infile_;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Jun 2021 20:44:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pull-data-from-public-private-domain-using-Proc-http-with-API/m-p/751061#M236361</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-06-29T20:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Pull data from public\private domain using Proc http with API token on windows platform</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pull-data-from-public-private-domain-using-Proc-http-with-API/m-p/751082#M236374</link>
      <description>Where should I give the token. That is mandatory.</description>
      <pubDate>Tue, 29 Jun 2021 22:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pull-data-from-public-private-domain-using-Proc-http-with-API/m-p/751082#M236374</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2021-06-29T22:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Pull data from public\private domain using Proc http with API token on windows platform</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pull-data-from-public-private-domain-using-Proc-http-with-API/m-p/752925#M237221</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It worked with little changes..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename dsn_out1 "c:\temp\Test.csv"; *output file path&amp;nbsp; &amp;amp; name;&lt;/P&gt;
&lt;P&gt;%let mytoken =xxxxxxxxxxxxxx; *API token;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;http&lt;/STRONG&gt; out=dsn_out1 verbose method="GET"&lt;/P&gt;
&lt;P&gt;URL="&lt;A href="https://protect.hhs.gov/foundry-data-proxy/api/dataproxy/datasets/&amp;amp;dsn_in./branches/master/csv/?includeColumnNames=true" target="_blank"&gt;https://NIH.org/dataproxy/datasets/&amp;amp;dsn_in./includeColumnNames=true&lt;/A&gt;";&lt;/P&gt;
&lt;P&gt;Headers&lt;/P&gt;
&lt;P&gt;"Authorization" = "Bearer &amp;amp;mytoken.";&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 16:36:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pull-data-from-public-private-domain-using-Proc-http-with-API/m-p/752925#M237221</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2021-07-08T16:36:38Z</dc:date>
    </item>
  </channel>
</rss>

