Hi fellow SAS Viya Programmers - Do you want to enable your users to access your SAS programs using REST API? Do you want to deliver your programs in a container? Then read on!
This article presents an easy way for SAS programmers to create a REST API server to front their SAS Viya Programs - including data steps, procedures, CAS Actions or CASL programs.
Full documentation for the create-viya-api tool is located on GitHub. Additionally, please follow this link if you'd like to see the details of the underlying server code. The entire project is based on restaf - An Easy Button To Access SAS Viya Using SAS Viya REST APIs.
Below is a short introductory video demonstrating the functionality.
Define your API end points using JavaScript
Authentication
In your handler (where you process the request), you have access to a context object with the following:
Deploy the server in a Docker container
The starter example has the following end points to jump start your development. These cover some basic scenarios.
Please try it out for yourself. And be sure to send your feedback - good or bad.
Please refer to the SAS Support site for full documentation.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.