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
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| content | Object[] | Data to retrieve token for. |
| groupId | String | Group (workspace) id. |
| id | String | Dahboasd/Report id |
| type | String | Type of content: report or dashboard. |
| embedToken | Object[] | |
| expiration | String | Expiration time of token. In UTC. |
| token | String | Embed token |
| tokenId | String | 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
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |