Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Retrieving Data with REST API

Accepted Solution Solved
Reply
Regular Contributor
Posts: 218
Accepted Solution

Retrieving Data with REST API

Hi All,

I need to send and receive data using REST API. Can someone help me where should I start at. I am very good at SAS coding, but not familiar with API.

 

Thanks,


Accepted Solutions
Solution
‎07-10-2017 04:21 PM
SAS Employee
Posts: 38

Re: Retrieving Data with REST API

Base SAS has what you need.

 

Here are a couple of papers from SAS Global Forum that provide explanations and examples.

REST at Ease with SAS®: How to Use SAS to Get Your REST (2015 SAS Global Forum)

REST at Ease with SAS®: How to Use SAS to Get Your REST (2016 SAS Global Forum)

View solution in original post


All Replies
Super User
Posts: 10,035

Re: Retrieving Data with REST API

You need SAS Viya .

Regular Contributor
Posts: 218

Re: Retrieving Data with REST API

Hi Ksharp, Thanks for your suggestion. Can you please tell me why SAS Viya? I hear some people saying PROC HTTP, JSON, DS2. How SAS Viya differ from them? What/How SAS Viya can accomplish better that Base SAS 9.4 can't do?

Thanks,
Community Manager
Posts: 2,955

Re: Retrieving Data with REST API

[ Edited ]

I think the reference to SAS Viya is for the other way: if you need to use REST APIs to access SAS analytics features from other applications, that's where SAS Viya comes in.  If you want to use SAS to access other APIs (like Google Analytics, Qualtrics, GitHub, and many others) -- then PROC HTTP provides a robust method.

Regular Contributor
Posts: 218

Re: Retrieving Data with REST API

Posted in reply to ChrisHemedinger
Hi Chris, All I need to do is retrieve 1000s of records through REST APIs. Analyse the dataset with product "SAS base with Access to ODBC" that I already have. Would you please tell me if I can accomplish my task with the product that I have which can support PROC HTTP and REST APIS? Thanks,
Solution
‎07-10-2017 04:21 PM
SAS Employee
Posts: 38

Re: Retrieving Data with REST API

Base SAS has what you need.

 

Here are a couple of papers from SAS Global Forum that provide explanations and examples.

REST at Ease with SAS®: How to Use SAS to Get Your REST (2015 SAS Global Forum)

REST at Ease with SAS®: How to Use SAS to Get Your REST (2016 SAS Global Forum)

Super Contributor
Posts: 441

Re: Retrieving Data with REST API

I use PROC HTTP for this. It has all the bells and whistles needed. If you receive json and you have SAS 9.4M4 (the latest maintenance release) you can then you can use the json libname engine to conveniently transform that intake a dataset. Otherwise there are a few alternative suggestions to accomplish that, using Groovy, DS2 or datasatep.

 

Hope this helps,

- Jan.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 1097 views
  • 2 likes
  • 5 in conversation