How to favourite a dashboard via REST API ?
This article provides guidance on how to update a dashboard as a favorite or non-favorite for users with read access.
Authorization
To execute this action, please ensure that a access token is included in your request header. For details on obtaining the access token, please refer to the relevant documentation here.
Authorization: bearer <token>
To update favorite dashboards, you will need to send a PUT request to the appropriate endpoint based on your server type as shown below :
Self-Hosted Server
For self-hosted instances, use the following endpoint:
https://{yourdomain}/bi/api/site/<site_identifier>/v4.0/dashboards/favorite
Bold BI Cloud Server
For Bold BI Cloud instances, the endpoint is:
https://{yourdomain}/bi/api/v4.0/dashboards/favorite
Request Type
- PUT: This request type is used to update the favorite dashboards.
Example Request
Here is an example of how to structure your PUT request:
Request Body Schema
To update the favorite status of a dashboard, the following parameters must be included in the request body:
- DashboardId (required): A string representing the unique identifier of the dashboard (in GUID format).
- Favorite (required): A boolean value. Set to
true
to mark the dashboard as a favorite, orfalse
to remove it from favorites.
Example Request Body
{
"DashboardId": "123e4567-e89b-12d3-a456-426614174000",
"Favorite": true
}
Responses
The API will return different responses based on the outcome of the request:
- 200: Favorite dashboard was modified successfully.
- 400: The content of the request body is missing or incomplete.
- 401: Access denied.
- 404: Item details not found.
- 405: Request type was not PUT.
- 417: Failed to favorite item.
After refreshing the page in application, the dashboard will be marked as favorite as shown below:
Additional References
To know more about Bold BI APIs