<?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: USE PROC HTTP to get data from API in XML format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/USE-PROC-HTTP-to-get-data-from-API-in-XML-format/m-p/407508#M99322</link>
    <description>&lt;P&gt;Most of the time you can take the API call, post it in a browser URL bar and get the response. Make sure that works first and then verify that PROC HTTP works. FYI - I used it last week so it definitely works as intended.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another check, make sure your version of SAS supports what you're trying to do&amp;nbsp;but I think PROC HTTP is pretty old. This is unlikely...but if you're not sure post your SAS version (i.e. 9.4 TS1M4)&lt;/P&gt;</description>
    <pubDate>Thu, 26 Oct 2017 00:00:47 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-10-26T00:00:47Z</dc:date>
    <item>
      <title>USE PROC HTTP to get data from API in XML format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USE-PROC-HTTP-to-get-data-from-API-in-XML-format/m-p/407498#M99317</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get data in XML format from an API.&amp;nbsp;&amp;nbsp;But the data I get form this API is always in JSON format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I confirmed with the API's developers that it can return data in both JSON and XML depending on the request&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code I am using:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FILENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; QAOS &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"/haexample/Example_Dir/Example.xml"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;HTTP&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;URL&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;FONT color="#800080" face="Courier New" size="3"&gt;"&lt;A href="http://example.cnn.com/api/Something?format=xml" target="_blank"&gt;http://example.cnn.com/api/Something?format=xml&lt;/A&gt;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;OUT&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = &lt;FONT face="Courier New"&gt;QAOS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;METHOD&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;= &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'GET'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;What am I missing here? Please help.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Ahmed&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 23:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USE-PROC-HTTP-to-get-data-from-API-in-XML-format/m-p/407498#M99317</guid>
      <dc:creator>aomy82</dc:creator>
      <dc:date>2017-10-25T23:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: USE PROC HTTP to get data from API in XML format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USE-PROC-HTTP-to-get-data-from-API-in-XML-format/m-p/407502#M99319</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32378"&gt;@aomy82&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Get from your API developers a working sample get request (the URL) where they confirm that you get an XML back.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 23:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USE-PROC-HTTP-to-get-data-from-API-in-XML-format/m-p/407502#M99319</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-10-25T23:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: USE PROC HTTP to get data from API in XML format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USE-PROC-HTTP-to-get-data-from-API-in-XML-format/m-p/407508#M99322</link>
      <description>&lt;P&gt;Most of the time you can take the API call, post it in a browser URL bar and get the response. Make sure that works first and then verify that PROC HTTP works. FYI - I used it last week so it definitely works as intended.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another check, make sure your version of SAS supports what you're trying to do&amp;nbsp;but I think PROC HTTP is pretty old. This is unlikely...but if you're not sure post your SAS version (i.e. 9.4 TS1M4)&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 00:00:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USE-PROC-HTTP-to-get-data-from-API-in-XML-format/m-p/407508#M99322</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-26T00:00:47Z</dc:date>
    </item>
  </channel>
</rss>

