Embeds
Rename an embed
Change the name and description of a dashboard embed, and optionally of its dashboard.
PUT
curl --request PUT https://api.usedatabrain.com/api/v2/data-app/embeds/rename \ --header "Authorization: Bearer $DATABRAIN_API_TOKEN" \ --header "Content-Type: application/json" \ --data '{ "embedId": "sales-overview", "name": "Sales at a glance", "isRenameDashboard": true }'Auth
A data app API token. See Authentication.
DataAppApiTokenheader
AuthorizationBearer <token>A data app API token. A service token is refused.
Body
A dashboard embed of the data app.
The new name. Cannot be empty.
embedDescriptionstring
The new description. "" does not clear it.
isRenameDashboardboolean
true or "true" also renames the dashboard. Every embed of that dashboard shows the new name. false, "false"
or no value keeps the dashboard name. Any other value, null too, is 400 INVALID_REQUEST_BODY.
Default:
falseResponse
{ "id": "sales-overview", "name": "Sales at a glance", "embedDescription": null }Errors
| Status | error.code | Why |
|---|---|---|
| 400 | INVALID_REQUEST_BODY | embedId or name is missing or empty, or isRenameDashboard is not true, false, "true" or "false" |
| 400 | INVALID_DATA_APP_API_KEY | You used a service token |
| 400 | INVALID_EMBED_ID | No dashboard embed of this data app has this id |
| 500 | INTERNAL_SERVER_ERROR | The rename failed. With isRenameDashboard, the embed can already have the new name: send the call again |
For errors that every endpoint returns, see Authentication.
curl -X PUT 'https://api.usedatabrain.com/api/v2/data-app/embeds/rename' \ -H 'Content-Type: application/json' \ -d '{ "embedId": "sales-overview", "name": "Sales at a glance", "isRenameDashboard": true}'Example Response
{ "id": "sales-overview", "name": "Sales at a glance", "embedDescription": null}