Great News! With the latest releases of 2025.08 for the SAP Analytics Cloud fast track customers (BI weekly release model) and for Quarterly release cycle with 2025 Q2 QRC, SAP Analytics Cloud Widget API is now Generally available.
The SAP Analytics Cloud (SAC) Widget API is a powerful tool that allows developers to embed charts from SAC stories into external applications. This blog will provide an overview of the Widget API, walk you through the integration process, and demonstrate how it can enhance your application’s analytical capabilities
The Widget API in SAP Analytics Cloud enables seamless embedding of SAC visualisations into external web applications, portals, or custom-built systems. With this API, you can:
Some key capabilities of the Widget API include:
Before getting started, ensure that you have:
This API enables seamless embedding of widgets from SAP Analytics Cloud into external applications. It comprises three main elements: a namespace, a function call, and a set of parameters (some mandatory, some optional).
4.1 Elements of the API :
4.2 Required Parameters:
Specifies the HTML container (such as a <div>) in your application where the widget should be embedded
Base URL of SAP Analytic cloud. Ex: https://sample.tenant.cloud/sap/fpa/ui
In view mode, right-click on the widget, go to More Options > Copy Widget ID. For example, the widget ID could be chart_2.
Note: Refer the SAC help documentation to programatically get the IDs of SAC stories ID and Widget IDs.
You can disable the widget interaction for users by passing the below optional parameters.
Note: By default, all these parameters are set it to true.
For secure communication, SAC requires authentication. Depending on your setup:
Ensure your SAC instance and the external application are configured to allow Cross-Origin Resource Sharing (CORS) for seamless data exchange.
Imagine a scenario where a bank uses a customer portal to provide users with real-time insights into their spending patterns. By embedding SAC charts into the portal using the Widget API, the bank can:
This integration enhances the user experience and keeps customers engaged with actionable insights.
2. Install the “Live Server” extension.
3. Open the sample html code in Visual studio code application!
4. Add SAC tenant details in the initialization displaywidget function.
5. Add the widget ID in the displaywidget function
6. Click the “Go Live” button to start the server and it will run the application in the browser.
7. Additionally, you can pass the filters and Variables:
sap.sac.api.widget.renderWidget(
containerId,
tenant,
storyId,
widgetId,
{
filters: [{
model: "sap.epm.Planned_Events_Sample:Planned_Events_Sample",
values: [{
dimension: "Date_5x2a25042z",
value: ["026b7dcf2350c824559b8cc00612de","05aff8031d1c560fa0ea6a675cc894","53a4b48d6e946faa59c35643d775c9"],
operation: 'in'
}]
},
{
model:"sap.epm.Planned_Events_Sample:Planned_Events_Sample",
values: [{
dimension: "Event_672z323k1f",
value: [""],
operation: 'notIn'
}]
},
{
model:"sap.epm.Planned_Events_Sample:Planned_Events_Sample",
values: [{
dimension: "Date_5x2a25042z",
value: ["026b7dcf2350c824559b8cc00612de"],
operation: 'notIn'
}]
}
]
},
updatedOptions
)
};Once the widget is successfully embedded into your application, the Widget API provides optional parameters that allow you to export a chart after it has been rendered.
Example:
const options = {
include: {
title: true,
subtitle: true,
footer: true
},
size: {
height: 300,
width: 300
}
}
await sap.sac.api.widget.export("widget1", "svg", options)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 36 | |
| 27 | |
| 26 | |
| 26 | |
| 26 | |
| 24 | |
| 23 | |
| 22 | |
| 22 | |
| 20 |