Using the "desc" Description Parameter of a Sisense Dashboard via the REST API
with a JSON payload solely of the new description parameter with the format:
Reading the "desc" Parameter
The description parameter can be accessed via the standard GET dashboard API endpoints or through the dashboard JS object. The "desc" parameter is available through the desc property in the JS object.
Republishing Changes
Republishing Dashboard Changes
If a dashboard is shared with other users, republish the dashboard for the changes to be visible to all other users who have access to the dashboard. Using the standard GUI republish button or the Republish (shares) API, following the same procedure as any other dashboard change in other parameters (such as in dashboard widgets).
The payload of this request is a standard dashboard sharesTo object.
Accessing the "desc" Parameter Using the Javascript Dashboard Object
The path to the `desc` parameter when viewing a dashboard in the web-native UI is available with the JS path:
prism.activeDashboard refers to the current active dashboard object on the prism object.
Use Cases of the Description Parameter
Although not extensively used within the Sisense UI, the "desc" parameter proves beneficial for web applications hosting Sisense in an embedded form, including Sisense.js and EmbedSDK. These applications can utilize the "desc" parameter for displaying descriptions as required or programmatically interacting with them.
In Sisense.js, the dashboard object mirrors the console's dashboard object and can be used for both display and programmatic purposes. In EmbedSDK, a modified dashboard object is accessible through the asynchronous getCurrent EmbedSDK function , providing the current dashboard state.
Similar steps apply to modifying other dashboard parameters via the API, and these parameters can also be read from the JS API dashboard object.
Share your experience in the comments!
Team Lead, Software Engineering of FES SWE at Sisense
0 comments