Using the "desc" Description Parameter of a Sisense Dashboard via the REST API
Using the "desc" Description Parameter of a Sisense Dashboard via the REST API and the Dashboard Javascript Object
The description parameter ("desc") of the Sisense dashboard object is notable for its somewhat unique characteristic – it's not accessible or editable through the Sisense Web GUI. Consequently, this parameter can only be programmatically accessed and modified. Despite this limitation, the "desc" parameter proves valuable for storing dashboard descriptions, facilitating programmatic interactions, or embedding usage.
Editing the "desc" Parameter
The "desc" parameter, part of the dashboard API and available within the Javascript dashboard object, is primarily edited using the REST API. Unlike other dashboard parameters, there is currently no graphical user interface (GUI) method to edit or view this parameter.
To edit the "desc" parameter, utilize standard dashboard APIs such as the PATCH dashboard API. The PATCH API requires a full dashboard object, obtainable through the GET dashboard API. After editing the "desc" parameter, use the modified object in the PATCH API endpoint.
The API endpoint for modifying the "desc" parameter with a minimal payload is as follows:
PATCH ${SisenseServerDomain}/api/dashboards/{dashboardID}
with a JSON payload solely of the new description parameter with the format:
{
"desc": "Description of Dashboard Here"
}
Reading the "desc" Parameter
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).
POST /api/shares/dashboard/${dashboardID}
Accessing the "desc" Parameter Using the Javascript Dashboard Object
prism.activeDashboard.desc
Use Cases of the Description Parameter
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.