BookmarkSubscribeRSS Feed
RichardP
Quartz | Level 8

Hello,

 

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?

RichardP_0-1598012011791.png

 

When I run the following code, I get a Bad Request message as response. Any help would be be very much appreciated!

 

filename input TEMP;

data _null_;
file input;
input;
put _infile_;
datalines;
{ "name":"value" }
run;


proc http
url="http://blah.com/SASBIWS/rest/storedProcesses/Products/SAS Intelligence Platform/Samples/stp_04_json_json"
in=input
out=resp username=xxx" password="xxx" ;
headers "Content-Type"="application/json" "Accept"="application/json";
run;

 

 

2 REPLIES 2
RichardP
Quartz | Level 8

when looking at the following documentation it would appear to be possible - 

 

RichardP_0-1598023701492.png

however I continue to receive a bad request when specifiying the JSON in the documented manner. 

ChrisHemedinger
Community Manager

Hi @RichardP - 

 

To me it looks like you are doing this correctly. But maybe @Vince_SAS has some ideas of what you can check.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2018 views
  • 0 likes
  • 2 in conversation