<?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: How to get (a correct) response from a REST-API via SAS 9.4M2? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-correct-response-from-a-REST-API-via-SAS-9-4M2/m-p/592756#M169988</link>
    <description>Have you seen this post from &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10937"&gt;@M_EEddlestone&lt;/a&gt;: &lt;A href="https://communities.sas.com/t5/SAS-Data-Mining-and-Machine/Retrieving-Data-with-REST-API/m-p/336178#M5026" target="_blank"&gt;https://communities.sas.com/t5/SAS-Data-Mining-and-Machine/Retrieving-Data-with-REST-API/m-p/336178#M5026&lt;/A&gt;</description>
    <pubDate>Mon, 30 Sep 2019 16:39:42 GMT</pubDate>
    <dc:creator>JosvanderVelden</dc:creator>
    <dc:date>2019-09-30T16:39:42Z</dc:date>
    <item>
      <title>How to get (a correct) response from a REST-API via SAS 9.4M2?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-correct-response-from-a-REST-API-via-SAS-9-4M2/m-p/591805#M169604</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to test a REST-API via SAS EG (version 9.4m2, not 3 yet unfortunately!!!)&lt;/P&gt;&lt;P&gt;So what I did is the folowing:&amp;nbsp;&lt;/P&gt;&lt;P&gt;(and sorry for censoring the link and tokens, as I can not share those!)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename resp "p:\temp\TestAPI.txt";
filename hdrs "p:\temp\HeadAPI.txt";

data _null_;
	file hdrs;
        put "Authorization: Bearer [MyTOKEN key here]";
        put "Accept: application/json";
        put "Accept-Language: nl";
run;

proc http 
	url='https://[censored]/api/2.0/'
	method="GET"
	headerin=hdrs
	out=resp;
run;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But all I get is the homepage in html code in the resp file...?&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm doing wrong here? Can someone help please?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 09:53:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-correct-response-from-a-REST-API-via-SAS-9-4M2/m-p/591805#M169604</guid>
      <dc:creator>SAS_Question</dc:creator>
      <dc:date>2019-09-26T09:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get (a correct) response from a REST-API via SAS 9.4M2?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-correct-response-from-a-REST-API-via-SAS-9-4M2/m-p/592756#M169988</link>
      <description>Have you seen this post from &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10937"&gt;@M_EEddlestone&lt;/a&gt;: &lt;A href="https://communities.sas.com/t5/SAS-Data-Mining-and-Machine/Retrieving-Data-with-REST-API/m-p/336178#M5026" target="_blank"&gt;https://communities.sas.com/t5/SAS-Data-Mining-and-Machine/Retrieving-Data-with-REST-API/m-p/336178#M5026&lt;/A&gt;</description>
      <pubDate>Mon, 30 Sep 2019 16:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-correct-response-from-a-REST-API-via-SAS-9-4M2/m-p/592756#M169988</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2019-09-30T16:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get (a correct) response from a REST-API via SAS 9.4M2?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-correct-response-from-a-REST-API-via-SAS-9-4M2/m-p/622672#M183185</link>
      <description>&lt;P&gt;Hi Jos,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply, and sorry for my late reaction. Was ill for a long time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway. We filed for a new version of SAS where the calling of an API is much more simpler then with this old version of us.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So will keep you informed when we get this to work with the new version.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for now!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 11:38:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-correct-response-from-a-REST-API-via-SAS-9-4M2/m-p/622672#M183185</guid>
      <dc:creator>SAS_Question</dc:creator>
      <dc:date>2020-02-06T11:38:43Z</dc:date>
    </item>
  </channel>
</rss>

