BookmarkSubscribeRSS Feed
ulfa
Calcite | Level 5

Hi all,

I have to call an API using OAUTH 2 method.

need to post the data and retrieve the result.

I have tried using postman using same authentication, token, and file and retrieve the result sucessfully, but why in SAS EG it doesnt have result ?

 

this is my code

 

filename out1 temp ;
proc http
method="POST"
IN="WORK.SME_B_SCORE_300ROW"
out=out1
url="http://10.17.16.190/predApi/v1.0/deployments/5ef3721a496d5c08b60c7f9d/predictions
headers "Authorization"="BEARER &token." ;
RUN;

 

data _null_;
infile out1 ;
input ;
put _INFILE_ ;
run;

 

and this is the result : it doesnt error, but give blank file

 

NOTE: The infile OUT1 is:
Filename=C:\Users\un29813x\AppData\Local\Temp\SEG6480\SAS Temporary Files\_TD3844_NNAT0770049006_\#LN00060,
RECFM=V,LRECL=32767,File Size (bytes)=13,
Last Modified=06Jul2020:11:20:17,
Create Time=06Jul2020:11:20:17

2 The SAS System 08:38 Monday, July 6, 2020

<HTML></HTML>
NOTE: 1 record was read from the infile OUT1.
The minimum record length was 13.
The maximum record length was 13.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 0 replies
  • 680 views
  • 0 likes
  • 1 in conversation