How to Export Dashboard with Filter using Bold BI REST API
Authentication
When you sign in to Bold BI, an authentication token is provided that should be attached in the request header (Authorization) for all subsequent API calls to authenticate the requests. To get the authorized token, refer to the following help documents:
Refer to the screen shot below to get the authorization token. For the token API, use the content type x-www-form-urlencoded or application/json
Use the generated authorization token in the request header. Refer to the sample request header as shown below.
Header Name | Value |
---|---|
Authorization | Bearer <Authorization_token> |
API Endpoint
Type | Endpoint |
---|---|
POST | v4.0/dashboards/export |
Sample URL for Bold BI Embedded Analytics Server:
{domain_name}/bi/api/site/{site_identifier}/v4.0/dashboards/export
Replace{domain_name}
with your server’s domain name and{site_identifier}
with the unique identifier of the site.
Sample URL for Bold BI Cloud Analytics Server:
{domain_name}/bi/api/v4.0/dashboards/export
Replace {domain_name}
with your server’s domain name
Request Body
Parameter Name | Required | Type | Description |
---|---|---|---|
DashboardId | Yes | Guid | Dashboard Id |
ServerPath | No | string | Category Name |
ExportType | Yes | string | Values allowed are Excel , Image , Pdf |
FilterParameter | No | string | Filter values |
Sample Request Body for Single Value in Filter Parameter
{
"DashboardId": "2023a285-6889-4de5-83dc-a6172e490ece",
"ServerPath": "Health Care",
"ExportType": "Pdf",
"FilterParameter":"Department= Cardiology"
}
Sample Request Body for Multiple Values in Filter Parameter
{
"DashboardId": "2023a285-6889-4de5-83dc-a6172e490ece",
"ServerPath": "Health Care",
"ExportType": "Pdf",
"FilterParameter":"Department= IN(Cardiology,Neurology)"
}
Sample Request Body for Multiple Columns in Filter Parameter
{
"DashboardId": "2023a285-6889-4de5-83dc-a6172e490ece",
"ServerPath": "Health Care",
"ExportType": "Pdf",
"FilterParameter":"Department= Cardiology & Year(Date)=2021"
}
Note: To know more about supported operators and parameters in filter value, please refer to the Filter Value documentation.
Response Schema
Name | Type |
---|---|
ApiStatus | bool |
Status | bool |
StatusMessage | String |
FileContent | Array of Bytes [] |
Sample Response
Note: The export dashboard can be performed only with users who have at least read access to that dashboard.