Articles in this section
Category / Section

How to List Bold BI Dashboards Based on Clients in an Embedded Applications?

Published:

In embedded applications, it is possible to retrieve a list of dashboards based on clients, even if those clients are not present as users in Bold BI. This can be achieved through the use of the REST API, which allows for the retrieval of dashboard lists based on categories that can be created for embedded clients.

Steps to Retrieve Dashboards

1. Categorize Customer Dashboards

First, categorize the dashboards in Bold BI for the Embed user. For example, create a category named ‘Sales’ for a specific client that contains two dashboards. This categorization is essential as it will be used in the subsequent API calls. Similarly, you can create as many categories based on your embed user requirement.

image.png

2. Generate an Access Token

To obtain the dashboard list, an access token for the admin user must be generated. This token is required for authentication when making API requests.

API Endpoint:
For Onpremise environment:

POST https://{yourdomain}/bi/api/site/<site_identifier>/token

For Cloud Environment

POST https://{yourdomain}/bi/api/token

Example:

POST http://localhost:53623/bi/api/site/site1/token

or

POST http://localhost:53623/bi/api/token

Request Body:

{
  "username": "test2@gmail.com",
  "embed_secret": "wgAiDBk4k6DJPRvNFeSD2VPrZHgC6Vy6",
  "grant_type": "embed_secret"
}

Response Example:

{
  "email": "test2@gmail.com",
  "idpreferenceid": "91e76354-60f3-4d12-acce-95c664a3e91e",
  "username": "test2",
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "bearer",
  "expires_in": 604800,
  "LoginResult": "True",
  "LoginStatusInfo": "Authentication successful"
}

Use the generated access_token for the specified user in the next step.

image.png

3. Retrieve Dashboards

To get the list of dashboards, make a GET request to the following API endpoint:

API Endpoint:

GET http://localhost:53623/bi/api/site/site1/v5.0/dashboards?serverPath=/Sales

Note: The serverPath parameter specifies the category of dashboards to retrieve. If serverPath is omitted, all dashboards will be returned.

Headers:

Authorization: Bearer <access_token>

Replace <access_token> with the token obtained in the previous step. This request will return the names of the dashboards within the specified category.

image.png

image.png

Additional References

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
SM
Written by Soundarya Mani Meharan
Updated:
Comments (0)
Please  to leave a comment
Access denied
Access denied