Hi all,
I want to test a REST-API via SAS EG (version 9.4m2, not 3 yet unfortunately!!!)
So what I did is the folowing:
(and sorry for censoring the link and tokens, as I can not share those!)
filename resp "p:\temp\TestAPI.txt";
filename hdrs "p:\temp\HeadAPI.txt";
data _null_;
file hdrs;
put "Authorization: Bearer [MyTOKEN key here]";
put "Accept: application/json";
put "Accept-Language: nl";
run;
proc http
url='https://[censored]/api/2.0/'
method="GET"
headerin=hdrs
out=resp;
run;
But all I get is the homepage in html code in the resp file...?
What I'm doing wrong here? Can someone help please?
Thanks in advance!
Hi Jos,
Thanks for your reply, and sorry for my late reaction. Was ill for a long time.
Anyway. We filed for a new version of SAS where the calling of an API is much more simpler then with this old version of us.
So will keep you informed when we get this to work with the new version.
Thanks for now!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.