Skip to Content

Embeds

Delete an embed

Remove an embed from a data app, and optionally the customer dashboard behind it.

DELETE
/api/v2/data-app/embeds
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.

Authorization

DataAppApiToken
headerAuthorizationBearer <token>

A data app API token. A service token is refused.

Query

embedIdstringrequired

A dashboard or metric embed of the data app.

true also deletes the dashboard. Only a dashboard that a customer made, and that no other embed uses.

Default: falseOne of: truefalse

Response

{ "id": "acme-sales" }

Errors

Statuserror.codeWhy
400INVALID_REQUEST_BODYembedId is missing
400INVALID_DATA_APP_API_KEYYou used a service token
400INVALID_EMBED_IDNo embed of this data app has this id
409INVALID_REQUEST_BODYWith isDeleteDashboard: Deletion blocked: internal dashboards can't be removed. or Deletion blocked: this dashboard is referenced by multiple embeds. Nothing was deleted
500INTERNAL_SERVER_ERRORThe embed was deleted, the dashboard was not

For errors that every endpoint returns, see Authentication.

Example Request
curl -X DELETE 'https://api.usedatabrain.com/api/v2/data-app/embeds?embedId=string'
Example Response
{  "id": "acme-sales"}