Skip to Content

Datamart APIs

Delete a datamart

Remove a datamart that nothing uses any more.

DELETE
/api/v2/data-app/datamart

Databrain refuses the delete while a workspace, embed, data app, metric or dashboard uses the datamart. It never deletes those for you. The path is singular: /datamart.

curl --request DELETE \  "https://api.usedatabrain.com/api/v2/data-app/datamart?datamartName=Sales" \  --header "Authorization: Bearer $DATABRAIN_SERVICE_TOKEN"

You cannot undo this.

Auth

A service token. See Authentication.

Authorization

ApiToken
headerAuthorizationBearer <token>

A service token or a data app API token.

Query

datamartNamestringrequired

The datamart name.

Response

{ "id": "Sales" }

id is the name of the deleted datamart.

Errors

Statuserror.codeWhy
400INVALID_REQUEST_BODYdatamartName is missing
400INVALID_DATAMARTNo datamart has this name
400INVALID_REQUEST_BODYA workspace or embed uses it. The message names them: datamart is connected with following workspace(...) or embed(...) please disconnect to proceed
409INVALID_REQUEST_BODYSomething else uses it: This model is still referenced. Remove its references before deleting it. Or it changed during the check: try again
504INVALID_REQUEST_BODYThe check took too long. Nothing was deleted. Try again

For errors that every endpoint returns, see Authentication.

Example Request
curl -X DELETE 'https://api.usedatabrain.com/api/v2/data-app/datamart?datamartName=string'
Example Response
{  "id": "Sales"}