Public API v1 → Schedule Dashboard Report Endpoint

About the /dashboards/{dashboardGuid}/send-report endpoint

The /dashboards/{dashboardGuid}/send-report endpoint creates and triggers a scheduler job for sending a dashboard report. Only the dashboard owner or a user with access rights to it can use the /dashboards/{dashboardGuid}/send-report endpoint to send the dashboard report.

For information about how to get started with Public API v1, refer to References → Public API v1.

Note

Use the HTTPS or HTTP scheme according to your installation.

Important

The Cluster Management Console (CMC) admin must define the email settings in the tenant configurations to allow the job to send the report.

Request URL

  • https://<cluster_URL>/incorta/api/v1/dashboards/{dashboardGuid}/send-report
  • https://<server address>:<port>/incorta/api/v1/dashboards/{dashboardGuid}/send-report

Request URL Parameter

Field nameDescriptionTypeExample
dashboardGuidThe GUID of the dashboard you want to sendString"79abe0db-67y6-4830-a9a7-2099x24b6541"
Note: You can find this GUID either in the metadata database or the address bar.

HTTP method

POST

Request headers

{
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access_token}"
}

You must use a valid access token of the dashboard owner or a user with access rights to it.

For information about how to create an access token, refer to Public API v1 → Create Token Endpoint.

Request body

{
"toExternalEmails": ["string"],
"toUsersNames": ["string"],
"toGroupNames": ["string"],
"bccExternalEmails": ["string"],
"bccUsersNames": ["string"],
"bccGroupsNames": ["string"],
"ccExternalEmails": ["string"],
"ccUsersNames": ["string"],
"ccGroupsNames": ["string"],
"subject": "string",
"body": "string",
"hideTemplate": boolean,
"useHTMLBody": boolean,
"appendTimestamp": boolean,
"bursting": boolean,
"outputFormat": "string"
}

Request body parameters

The following table describes the request body parameters in the /dashboards/{dashboardGuid}/send-report endpoint.

ParameterTypeDescriptionRequiredValues
outputFormatStringThe format of the dashboard report you want to sendRequired
  ●  html
  ●  csv
  ●  pdf
  ●  xlsx
Example: "pdf"
toExternalEmailsArray of string valuesList of external emails that will receive the scheduled dashboard reportOptionalValid email addresses separated by commas.
Example: ["abc@mail.com", "def@mail.com"]
toUsersNamesArray of string valuesList of users that will receive the scheduled dashboard reportOptionalUser names, as defined in Incorta, separated by commas.
Example: ["user1", "user2"]
toGroupNamesArray of string valuesList of groups that will receive the scheduled dashboard reportOptionalGroup names, as defined in Incorta, separated by commas.
Example: ["HrGroup", "Analyzers"]
bccExternalEmailsArray of string valuesList of external emails that will receive the scheduled dashboard report as a blind carbon copyOptional
bccUsersNamesArray of string valuesList of users that will receive the scheduled dashboard report as a blind carbon copyOptional
bccGroupsNamesArray of string valuesList of groups that will receive the scheduled dashboard report as a blind carbon copyOptional
ccExternalEmailsArray of string valuesList of external emails (external recipients) that will receive the scheduled dashboard report as a carbon copyOptional
ccUsersNamesArray of string valuesList of users that will receive the scheduled dashboard report as a carbon copyOptional
ccGroupsNamesArray of string valuesList of groups that will receive the scheduled dashboard report as a carbon copyOptional
bursting*BooleanSpecify if you want to enable the bursting option to send the dashboard according to the security context of the recipientOptional
  ●  true
  ●  false (default)
appendTimestampBooleanSpecify if you want to append the time of sending the report to the file nameOptional
  ●  true (default)
  ●  false
useHTMLBodyBooleanSpecify if you want to use HTML email body instead of plain text.
You must use inline CSS styles only. Write the email body in the form of <div> content </div>
Optional
  ●  true
  ●  false (default)
hideTemplateBooleanSpecify if you want to hide the default emailOptional
  ●  true
  ●  false (default)
bodyStringThe body of the sent mailOptional
subjectStringThe subject of the sent mailOptional
*Bursting reports

You can’t send a bursting dashboard report to external recipients or to internal recipients as a carbon copy (CC) or a blind carbon copy (BCC). Therefore, if you set the bursting option to true, don’t add any value to the CC or BCC parameters, such as ccGroupsNames, or the external recipients.

Request body example

{
"toExternalEmails": ["customer@external.com"],
"toUsersNames": ["user1", "user2"],
"toGroupNames": ["finance", "sales"],
"bccExternalEmails": [""],
"bccUsersNames": [""],
"bccGroupsNames": [""],
"ccExternalEmails": ["ceo@company.com"],
"ccUsersNames": [""],
"ccGroupsNames": [""],
"subject": "Q1 Revenue Report ",
"body": "<div>Hello, <br />Kindly check the <b>Q1 revenue report</b>. <br /> Thanks,</div>",
"hideTemplate": false,
"useHTMLBody": true,
"appendTimestamp": true,
"bursting": false,
"outputFormat": "pdf"
}

Endpoint response

The following table shows the HTTP response status codes for this endpoint.

CodeDescriptionPayload Response
201The endpoint created the scheduled job to send the dashboard reportThe response contains the ID and name of the created job. {"jobId": 0,"jobName": "string"}
Example: {"jobId": 924, "jobName": "Public API triggered Job_16722303645"}
400You set the bursting property to true while adding values to the external recipients or CC groups.{"message": "string"}
Example: {"message": "INC_05070000: Only toUsersNames and toGroupsNames are allowed as bursting reports recipients."}
422You provided invalid values, such as invalid email addresses or output format.{"message": "string"}
Example {"errorMessages":[{"message": "INC_01210000: bccExternalEmails Following emails are invalid: abc@"},{"message": "INC_01210000: outputFormat must match \"html\|csv\|pdf\|xlsx\""}]}
403The endpoint couldn’t create the scheduled job due to authentication errors, such as an invalid or expired access token, or you don’t have access rights to the dashboard.{"message": "string"}
Example {"INC_02010000: You are not authorized to VIEW the Demo DASHBOARD of ID [758]."}
404The endpoint couldn’t find the dashboard you provided its GUID.{"message": "string"}
Example: {"message": "INC_05111201: The [ab642c0-c086-4xa9-9fb9-d4c75e4613c7] DASHBOARD cannot be found."}
500Internal Server Error The endpoint couldn’t create the scheduled job due to a server error.{"message": "string"}