Category / Section
How to get the dashboard schedules using REST API
Published:
This article explains on how to get the dashboard schedules of the Bold BI tenant site using REST API.
How to get Dashboard Schedules of a tenant
Users who have read access to the schedule can get the list of dashboard schedules
Embed BI URL: {domain_name}/bi/api/site/{site_identifier}/v4.0/dashboards/schedules
Cloud BI URL: {domain_name}/bi/api/v4.0/dashboards/schedules
Http Method: Get
Authorization: bearer<access_token>
Query Parameters
Parameter Name | Value |
---|---|
page | It indicates the current page number and accepts integer value. Example: page=1 |
page_size | It denotes the number of schedules lists per page.
|
q | Search Keyword.
Example: q=sales |
sort | Sorting type.
Example: sort=+ |
Sample Request
Sample Response
{
"Data": [
{
"ScheduleId": "1931778b-8828-47b5-bf25-e511711d8596",
"ScheduleName": "demo",
"ItemType": 7,
"CanRead": true,
"CanWrite": true,
"CanDelete": true,
"CanDownload": true,
"CanSchedule": false,
"CanOpen": true,
"CanMove": true,
"CanCopy": true,
"CanClone": true,
"CanCreateItem": false,
"CreatedById": 1,
"CreatedByDisplayName": "Guest",
"ModifiedById": 1,
"ModifiedByFullName": "Guest",
"CreatedDate": "05/12/2023 06:29 PM",
"ModifiedDate": "05/12/2023 06:29 PM",
"ItemCreatedDate": "2023-05-12T18:29:46",
"ItemModifiedDate": "2023-05-12T18:29:46",
"FailureOccurrence": 0,
"FailureNotificationToOwner": false,
"FailureNotificationToRecipient": false,
"ExportFormatInfo": {
"ExportType": "Image",
"Extension": "jpg",
"Resolution": 96
},
"StartDate": "2023-05-12T12:59:00",
"EndDate": "9999-12-31T23:59:59",
"NextSchedule": "2023-05-16T06:59:00",
"NeverEnd": true,
"EndAfterOccurrence": 0,
"UserList": [
1
],
"ExternalRecipientsList": [],
"HourlySchedule": {
"ScheduleInterval": "0:15"
},
"DashboardId": "bf5d3948-640b-4968-a141-ccc6d175bc16",
"DashboardName": "Sales1",
"RecurrenceTypeId": 9,
"RecurrenceType": "Hourly",
"Email": {
"Subject": "{:OrganizationName}: Your scheduled dashboard",
"Body": "Hello {:Username},\n\nPlease find attached, the dashboard that you had requested. \n \nSchedule- {:ScheduleName} has exported the dashboard [{:DashboardName}]({:DashboardLink}).\n\nRegards,\n\n{:OrganizationName}"
},
"IsActive": true,
"IsEnabled": true
}
],
"TotalResults": 1,
"Links": [
{
"Link": "http://localhost:55048/bi/api/site/site1/v4.0/dashboards/schedules?q=demo&page=1&page_size=25",
"Rel": "first",
"Type": "GET"
},
{
"Link": "http://localhost:55048/bi/api/site/site1/v4.0/dashboards/schedules?q=demo&page=1&page_size=25",
"Rel": "last",
"Type": "GET"
}
]
}
Error Message
HTTP status code | Description | Error Message |
---|---|---|
204 | NoContent | Item details not Found |
400 | BadRequest | Page does not exists |
401 | UnAuthorized | Access denied |
405 | MethodNotAllowed | Request type was not GET |
417 | ExpectationFailed | Failed to retrieve the schedules |
To get Authentication Token
When the user signs into the Bold BI, an authentication token is provided that should be attached in the request header (Authorization) for all API calls to authenticate the requests. You can generate an authentication token using either password or embed secret.
Password Authentication
Embed BI URL: {domain_name}/bi/api/site/{site_identifier}/token
Cloud BI URL: {domain_name}/bi/api/token
Cloud BI URL: {domain_name}/bi/api/token
Http Method: Post
Content Type: application/json
Request Body Schema
{
"username": "string",
"password": "string",
"grant_type": "string"
}
Parameter Name | Value |
---|---|
username | Email address of the user. |
password | Password of the user. |
grant_type | Value allowed is password |
Response
{
"access_token": "string",
"token_type": "string",
"expires_in": "string",
"Email": "string"
}
Embed Secret authentication
Embed BI URL: {domain_name}/bi/api/site/{site_identifier}/token
Cloud BI URL: {domain_name}/bi/api/token
Cloud BI URL: {domain_name}/bi/api/token
Http Method: Post
Content Type: application/json
Request Body Schema
{
"username": "string",
"embed_secret": "string",
"grant_type": "string"
}
Parameter Name | Value |
---|---|
username | Email address of the user. |
embed_secret | Embed secret of the site. |
grant_type | Value allowed is embed_secret |
Response
{
"access_token": "string",
"token_type": "string",
"expires_in": "string",
"Email": "string"
}
To get Embed secret code of the site, follow below steps.
- Navigate the following page in the BI tenant site Settings -> Embed.
- You can obtain the Embed Secret from this page by clicking Generate Secret button.
Note: Once generated new embed secret then old value will not work.