BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ElPrebsiDK
Calcite | Level 5

Hi SAS experts.

I am looking at calling SAS Viya REST APIs, and found the documentation containing a lot of code examples. Do you know if SAS expose a Swagger / OpenAPI contract file for that API?

https://go.documentation.sas.com/api/collections/edmcdc/v_003/docsets/edmresttut/content/edmresttut.... 

1 ACCEPTED SOLUTION

Accepted Solutions
alexal
SAS Employee

You won't be able to download a swagger file, they weren't published on the external website. Please use the ReDoc link I've provided above to get information about the API.

View solution in original post

6 REPLIES 6
ElPrebsiDK
Calcite | Level 5

Thanks for the quick reply. I might be missing the obvious here? The link you provided looks like a GUI representation of the swagger yaml contract. But I can't seem to find the link to download the swagger file, so that I can build client code based on that in my development project.

alexal
SAS Employee

You won't be able to download a swagger file, they weren't published on the external website. Please use the ReDoc link I've provided above to get information about the API.

ElPrebsiDK
Calcite | Level 5

Thanks Alexal.

 

If anybody else find the Swagger document for the Viya REST API, I am very interested. I am building a java client for the Viya REST API, so having the swagger document to generate code from will save me a lot of hours re-coding the info from the documentation.

joeFurbee
Community Manager

Hi @ElPrebsiDK

The link @alexal provided is for the REST API doc. At this point that's all we have published externally. 

 

We do have it on our roadmap to eventually publish the Swagger/OpenAPI file, but we aren't at the point where we can share them yet. If you have a specific use case for using it for integration purposes we'd be interested in understanding it. Please let me know.
 
Thanks,
Joe

Join us for SAS Community Trivia
SAS Bowl XLIII, The New SAS Developer Portal
Wednesday, August 14, 2024, at 10 a.m. ET | #SASBowl

ElPrebsiDK
Calcite | Level 5

Hi Joe.

Thanks for sharing your thoughts. Exposing REST APIs and the underlying contract kind of goes hand in hand. This is the first API I have stumbled upon, that restricts access to the contract. There is great tool support for generating client code in most flavors of most programming languages. And your html documentation seems to be generated based on a swagger document. So depending on how much of the API we need to integrate with, it might be worth while for me to build a reverse engineering tool to read your documentation and build the swagger myself. That way I am sure that nothing gets lost in the copy/paste/translate to java process.

 

How do other clients integrate with your APIs? Do they copy/paste snippets of code from the documentation?

 

Regards

Preben

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 2222 views
  • 0 likes
  • 3 in conversation