SAS REST API Use Cases for developers

Get inspired by the possibilities and discover some use cases

This GitHub project aims to leverage the knowledge base of the SAS users and developers community for better SAS API documentation, user guides and quick starts. Highlights include:​​​​

  • Use cases available in various languages
  • Use cases are self containted and come with everything you need to exectute.
  • We encourage external contributions. Have something to offer? Create a pull request.

API Use Case List - Select a use case to access the resources on GitHub.

SAS Job Execution
This use case leverages multiple SAS Viya APIs to create an end-to-end example for Job Execution.

Key steps from the example: 
 • creates a folder
 • creates and executes a SAS job
 • returns output and logs

Use cases available in these interfaces and languages:

Auto Machine Learning
Use the MLPA API to perform the end-to-end machine learning process, from data set to deployed model in production.

Key steps from the example: 
 • identify data set and target variable 
 • kick off the automl pipeline
 • use trained model to make predictions on a target variable

Use cases available in these interfaces and languages:

MAS Real-Time Scoring
This collection executes a decision using the SAS SAS Micro Analytic Service API.

Key steps from the example: 
 • score in real-time using new data passed in an API call
 •
use a decision model from MAS
 • score model using test data in JSON format

Use cases available in these interfaces and languages:

Authentication and Client Registration
These scripts register a client (one-time process) and generate an access token for use cases in the repository..

Key steps from the example: 
 • use as a per-requisite for other use cases in the repository
 • use the authentication script to register client
 • generate an access token to use in all other use cases

Use cases available in these interfaces and languages:

SAS Catalog API
This series of use cases demonstrates how to define and manage metadata.

Key steps from the example: 
 • retrieve metadata for assets  
• 
define metadata for information consumed, used, or related to assets  
• 
integrate metadata with third-party systems
• find metadata for assets
• 
build and manage 'bots' which populate the catalog with table metadata

Use cases available in these interfaces and languages:

Modeling and Deployment
This collection leverages multiple API (both SAS Viya and CAS) to create an end to end example for modeling.

Key steps from the example: 
 • creates and train a model
 • publish the model
 • score new data

Use cases available in these interfaces and languages:

Text Analytics Scoring
This app leverages our SAS Viya and CAS APIs to demonstrate how one can operationalize text models.

Key steps from the example: 
 • choose from three text analytics models:
        - sentiment analysis
        - concepts
        - categories

Use cases available in these interfaces and languages:

Open Source Modeling
This app executes calls needed for creating, updating, deploying, assessing performance, and executing an open source model.

Key steps from the example: 
 • example uses Python xgboost model
 • import score, pkl file, perf data and training code
 • create and execute model performance report

Use cases available in these interfaces and languages:

Execute SAS Code
This example executes an existing Job (and thus, the SAS code within the Job) and get its outputs.

Key steps from the example: 
 • use an existing Job to execute SAS code via a URL
 • example uses a simple print statement; create your own code
 • outputs include HTML form and logs

Use cases available in these interfaces and languages: