Datamart APIs
Delete a datamart
Remove a datamart that nothing uses any more.
DELETE
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.
ApiTokenheader
AuthorizationBearer <token>A service token or a data app API token.
Query
The datamart name.
Response
{ "id": "Sales" }id is the name of the deleted datamart.
Errors
| Status | error.code | Why |
|---|---|---|
| 400 | INVALID_REQUEST_BODY | datamartName is missing |
| 400 | INVALID_DATAMART | No datamart has this name |
| 400 | INVALID_REQUEST_BODY | A workspace or embed uses it. The message names them: datamart is connected with following workspace(...) or embed(...) please disconnect to proceed |
| 409 | INVALID_REQUEST_BODY | Something else uses it: This model is still referenced. Remove its references before deleting it. Or it changed during the check: try again |
| 504 | INVALID_REQUEST_BODY | The check took too long. Nothing was deleted. Try again |
For errors that every endpoint returns, see Authentication.
curl -X DELETE 'https://api.usedatabrain.com/api/v2/data-app/datamart?datamartName=string'Example Response
{ "id": "Sales"}