SAS Programming

DATA Step, Macro, Functions and more
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.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

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
  • 1888 views
  • 0 likes
  • 2 in conversation