Hi,
I have a series of API's that I want to automatically pull into SAS on a daily/weekly basis. The data is in Json format. Please can somebody offer advice on how I would go about doing this from a coding perspective? I've never needed to do this before and hence I'm not quite sure the steps involved. I am using SAS 9.4.
Many thanks
Chris
That's a very big question but as a start you could check out Proc HTTP to issue HTTP requests to bring the data into SAS then use the JSON libname engine to convert the JSON into SAS data sets. You'll find some documentation to get you started at these links:
Reading data with PROC HTTP and the JSON libname engine
How to test PROC HTTP and the JSON engine
The JSON LIBNAME Engine: Real-World Applications Using Open APIs
My advice would be to give this a try and post more specific questions if/when you hit a problem.
That's a very big question but as a start you could check out Proc HTTP to issue HTTP requests to bring the data into SAS then use the JSON libname engine to convert the JSON into SAS data sets. You'll find some documentation to get you started at these links:
Reading data with PROC HTTP and the JSON libname engine
How to test PROC HTTP and the JSON engine
The JSON LIBNAME Engine: Real-World Applications Using Open APIs
My advice would be to give this a try and post more specific questions if/when you hit a problem.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.