System - Get embed token

API Url

Use it to get an embed token for powerBi reports/dashboards to use it with embedURL.

POST
http://localhost:16010/ProMarkREST/web/PowerBI/content/token

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    contentObject[]

Data to retrieve token for.

      groupIdString

Group (workspace) id.

      idString

Dahboasd/Report id

      typeString

Type of content: report or dashboard.

    embedTokenObject[]
      expirationString

Expiration time of token. In UTC.

      tokenString

Embed token

      tokenIdString

Unique token Id.

Request example:

{
"request": {
"data": {
"content":{
"id": "79e2a45c-e028-4fd3-b5bd-c2598e12ef31",
"type": "dashboard",
"groupId": "af7f62df-febb-4708-96a1-25cc60393870"
}
}
}
}

Success example

HTTP/1.1 200 OK
{
"response": {
"data": {
"embedToken": {
"token": "H4sIAAAAAAAEAB2Tx66DVgAF...",
"tokenId": "f64fddfc-9016-40b3-87db-e43fb170f2c5",
"expiration": "2020-10-06T10:34:07Z"
}
}
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.