BookmarkSubscribeRSS Feed

SAS Viya SDK for JavaScript- A Tale of Two Methods (Part 1 – Overview)

Started ‎02-25-2025 by
Modified ‎05-20-2025 by
Views 1,238

This is the first part of a three-part series that describes the connection options for the SAS Viya SDK for JavaScript.

 

SAS provides a set of software development kits (SDKs) that help developers embed insights and content from SAS Viya into custom dashboards, portals, and web pages. A software development kit is a set of tools that help developers create software or apps for a specific platform, operating system, computer system, or device. An SDK can contain libraries, APIs, utilities, sample software, technical notes with documentation, code samples, or tutorials. SDKs enable developers to create content that will work with a specific environment.

 

The SAS Viya SDK for JavaScript is a collection of JavaScript libraries that allow you to embed insights and content from SAS Viya into custom dashboards and portals. The SDK is comprised of three libraries:

  • Authentication Library: sas-auth-browser
  • Content Components Library: content-components
  • Report Components Library: va-reports-components

 

The Authentication Library

The authentication library (sas-auth-browser) provides an API that ensures that a user is authenticated before making SAS API calls or using SAS web components. This library is needed to use both the content components library and the report components library in the SAS Viya SDK for JavaScript. For examples on how to use the authentication library to connect to SAS Viya, see https://github.com/sassoftware/sas-viya-sdk-js/tree/main/sdk/sas-auth-browser.

 

The Content Components Library

The content components library (content-components) is a JavaScript library that enables users to navigate, preview, and open content in SAS Viya from custom web pages and applications. Users can browse items in SAS Viya folders and, when integrated with the report components library, can display reports from SAS Visual Analytics. When using the content components library, you also need to access the authentication library to ensure user authentication. This is a useful library to use to build your own interface that can directly integrate with and navigate through SAS Viya content. For documentation and examples on how to use the content components library to create tiles representing SAS Viya content items, see https://github.com/sassoftware/sas-viya-sdk-js/tree/main/sdk/content-components/examples.

 

The Report Components Library

The report components library (va-report-components) is a collection of JavaScript libraries that can be used to embed SAS Visual Analytics content in your custom web pages and applications. The report components library calls the authentication library implicitly, so there is no need to access the authentication library in your code. You can use the provided framework to embed an entire report, pages from a report, or individual graph objects from multiple reports to give your consumers a completely unique, innovative, and customized experience. Users can even drive interactions and filters on SAS visualizations using other Visual Analytics content or using interface elements included in your web page or application. Using the power of SAS Viya, this library enables you to seamlessly integrate your specific design requirements with a wide range of analytics and insights delivered by SAS Viya. For documentation and examples on how to use the report components library to embed Visual Analytics report content, see https://github.com/sassoftware/sas-viya-sdk-js/tree/main/sdk/va-report-components.

 

Methods of Embedding Content

In this series, we will focus on the report components library, which can be used in two fundamentally different ways: online using a direct connection to SAS Viya or offline using SAS report packages. Each method has its benefits and limitations, which will be discussed in future articles. The method you choose may depend on many factors, including your organizational policies, the features and functionality you want to include in your web page, and the types of configurations you want to make in your environment.

 

In the next part of this series, we discuss the requirements, the steps, and the details of using the report components library by connecting directly to SAS Viya.

 

References

Documentation: SAS Visual Analytics SDK

Documentation: SAS Content SDK

Examples: sas-auth-browser

Documentation and Examples: content-components

Documentation and Examples: va-report-components

Comments

@nicolemarieball I found this blog very interesting, is this an another option for make Viya reports available on other website? Until now I have heard about SAS Report Package.

 

@touwen_k SAS report packages are created using the SAS Viya SDK for JavaScript, so they are the same thing!

Contributors
Version history
Last update:
‎05-20-2025 10:14 AM
Updated by:

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Tags