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!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.