Embeds
Delete an embed
Remove an embed from a data app, and optionally the customer dashboard behind it.
DELETE
curl --request DELETE \ "https://api.usedatabrain.com/api/v2/data-app/embeds?embedId=acme-sales&isDeleteDashboard=true" \ --header "Authorization: Bearer $DATABRAIN_API_TOKEN"You cannot undo this. Guest tokens you already gave out are not revoked; they stop working when they expire.
Auth
A data app API token. See Authentication.
DataAppApiTokenheader
AuthorizationBearer <token>A data app API token. A service token is refused.
Query
A dashboard or metric embed of the data app.
isDeleteDashboardstring
true also deletes the dashboard. Only a dashboard that a customer made, and that no other embed uses.
Default:
falseOne of: truefalseResponse
{ "id": "acme-sales" }Errors
| Status | error.code | Why |
|---|---|---|
| 400 | INVALID_REQUEST_BODY | embedId is missing |
| 400 | INVALID_DATA_APP_API_KEY | You used a service token |
| 400 | INVALID_EMBED_ID | No embed of this data app has this id |
| 409 | INVALID_REQUEST_BODY | With isDeleteDashboard: Deletion blocked: internal dashboards can't be removed. or Deletion blocked: this dashboard is referenced by multiple embeds. Nothing was deleted |
| 500 | INTERNAL_SERVER_ERROR | The embed was deleted, the dashboard was not |
For errors that every endpoint returns, see Authentication.
curl -X DELETE 'https://api.usedatabrain.com/api/v2/data-app/embeds?embedId=string'Example Response
{ "id": "acme-sales"}