BookmarkSubscribeRSS Feed
HeidiDT
Quartz | Level 8

Hi All

I am trying to POST issues to Data Remediation using the REST API, but keep getting 500 Internal Server Error. I am just trying with one issue at the moment just to get the logging sorted out, and then I will start looking at logging multiple issues. Here is my SAS Enterprise Guide code and I have attached the input file. Please could you assist if possible?

 

 
 
filename in "/sas/batch/sasdata/dataremediation/tables/json_manual.txt";
filename out "/sas/batch/sasdata/dataremediation/tables/json_out.txt";
 
    method="POST"
    ct="application/json; charset=utf-8"
/* webauthdomain="LinuxAuth"*/
webusername="heididt"
webpassword="{SAS002}66B564224EE630732E6388E0395887EC37DCE27D300D953A"
      ;
run;
5 REPLIES 5
joeFurbee
Community Manager

Hi @HeidiDT,

I've not worked with the Data Remediation APIs before, so it may take me a bit of time to gather resources to assist.

 

Unfortunately a 500 error doesn't give us much to go on. Can you try a 'GET' method on the same groups endpoint? Establishing a connection is the first step before we can troubleshoot further.


Join us for SAS Community Trivia
SAS Bowl XXXVI, Data Simulation
Wednesday, December 13, 2023, at 10 a.m. ET | #SASBowl

AlanC
Barite | Level 11

Joe sounds like he has this covered. I wanted to add that you should always get the API working with Postman SoapUI, or other web testing tool before tackling the SAS code. Have you done that already? 

https://github.com/savian-net
HeidiDT
Quartz | Level 8

Hi @AlanC. I have tried with Postman and am getting the same error unfortunately. 

AlanC
Barite | Level 11
Dig down into the error as much as possible. When I get into this area, I turn on Fiddler and check the traffic flow. Postman probably gives you something similar but you can use Fiddler with Postman as well. You have to look at the raw request and response going and coming.
https://github.com/savian-net
HeidiDT
Quartz | Level 8

Hi All!

So I have managed to get past the 500 error and am now getting a 401 (unauthorized) error. I have been trying to find documentation on the wed regarding authentication when using the SAS provided APIs, but am not having much luck. Can anyone help with authentication for SAS RESTful APIs in general, please?

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 713 views
  • 0 likes
  • 3 in conversation