Articles in this section
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 NameValue
pageIt indicates the current page number and accepts integer value.

Example: page=1
page_sizeIt denotes the number of schedules lists per page.
  • Page size default value is 25.
  • Page size maximum value is 100.
q

Search Keyword.

  • Keyword searched in Name, Description, and CreatedByDisplayName

Example: q=sales
sortSorting type.
  • Values allowed are +(ascending), -(descending).

Example: sort=+
Sample Request
image.png
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 codeDescriptionError Message
204NoContentItem details not Found
400BadRequestPage does not exists
401UnAuthorizedAccess denied
405MethodNotAllowedRequest type was not GET
417ExpectationFailedFailed 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


Http Method: Post
Content Type: application/json

Request Body Schema
{
   "username": "string",
   "password": "string",
   "grant_type": "string"
}
Parameter NameValue
usernameEmail address of the user.
passwordPassword of the user.
grant_typeValue 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


Http Method: Post
Content Type: application/json

Request Body Schema
{
   "username": "string",
   "embed_secret": "string",
   "grant_type": "string"
}
Parameter NameValue
usernameEmail address of the user.
embed_secretEmbed secret of the site.
grant_typeValue 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.

  1. Navigate the following page in the BI tenant site Settings -> Embed.
    image.png
  2. You can obtain the Embed Secret from this page by clicking Generate Secret button.
    image.png
    Note: Once generated new embed secret then old value will not work.
Related Links

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