<?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 Creating a REST webservice with JSON input in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-REST-webservice-with-JSON-input/m-p/678422#M204751</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can someone please point me in the right direction. I have created a REST web service with accepts XML input. I now would like to change this to JSON. However I am having difficulty specifying this in the Stored Process Data screen. Is this the correct method?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardP_0-1598012011791.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48524iED3DDFF2054D6EEC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardP_0-1598012011791.png" alt="RichardP_0-1598012011791.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run the following code, I get a Bad Request message as response. Any help would be be very much appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename input TEMP;&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;file input;&lt;BR /&gt;input;&lt;BR /&gt;put _infile_;&lt;BR /&gt;datalines;&lt;BR /&gt;{ "name":"value" }&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc http&lt;BR /&gt;url="&lt;A href="http://blah.com/SASBIWS/rest/storedProcesses/Products/SAS" target="_blank"&gt;http://blah.com/SASBIWS/rest/storedProcesses/Products/SAS&lt;/A&gt; Intelligence Platform/Samples/stp_04_json_json"&lt;BR /&gt;in=input &lt;BR /&gt;out=resp username=xxx" password="xxx" ;&lt;BR /&gt;headers "Content-Type"="application/json" "Accept"="application/json";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Aug 2020 12:18:05 GMT</pubDate>
    <dc:creator>RichardP</dc:creator>
    <dc:date>2020-08-21T12:18:05Z</dc:date>
    <item>
      <title>Creating a REST webservice with JSON input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-REST-webservice-with-JSON-input/m-p/678422#M204751</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can someone please point me in the right direction. I have created a REST web service with accepts XML input. I now would like to change this to JSON. However I am having difficulty specifying this in the Stored Process Data screen. Is this the correct method?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardP_0-1598012011791.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48524iED3DDFF2054D6EEC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardP_0-1598012011791.png" alt="RichardP_0-1598012011791.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run the following code, I get a Bad Request message as response. Any help would be be very much appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename input TEMP;&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;file input;&lt;BR /&gt;input;&lt;BR /&gt;put _infile_;&lt;BR /&gt;datalines;&lt;BR /&gt;{ "name":"value" }&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc http&lt;BR /&gt;url="&lt;A href="http://blah.com/SASBIWS/rest/storedProcesses/Products/SAS" target="_blank"&gt;http://blah.com/SASBIWS/rest/storedProcesses/Products/SAS&lt;/A&gt; Intelligence Platform/Samples/stp_04_json_json"&lt;BR /&gt;in=input &lt;BR /&gt;out=resp username=xxx" password="xxx" ;&lt;BR /&gt;headers "Content-Type"="application/json" "Accept"="application/json";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 12:18:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-REST-webservice-with-JSON-input/m-p/678422#M204751</guid>
      <dc:creator>RichardP</dc:creator>
      <dc:date>2020-08-21T12:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a REST webservice with JSON input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-REST-webservice-with-JSON-input/m-p/678484#M204787</link>
      <description>&lt;P&gt;when looking at the following documentation it would appear to be possible -&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardP_0-1598023701492.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48533i9C77DBDBD0F45BAA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardP_0-1598023701492.png" alt="RichardP_0-1598023701492.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;however I continue to receive a bad request when specifiying the JSON in the documented manner.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 15:29:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-REST-webservice-with-JSON-input/m-p/678484#M204787</guid>
      <dc:creator>RichardP</dc:creator>
      <dc:date>2020-08-21T15:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a REST webservice with JSON input</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-REST-webservice-with-JSON-input/m-p/679416#M205157</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274763"&gt;@RichardP&lt;/a&gt;&amp;nbsp;-&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To me it looks like you are doing this correctly. But maybe&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13635"&gt;@Vince_SAS&lt;/a&gt;&amp;nbsp;has some ideas of what you can check.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 12:23:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-REST-webservice-with-JSON-input/m-p/679416#M205157</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-08-26T12:23:40Z</dc:date>
    </item>
  </channel>
</rss>

