Workspace APIs
Delete a workspace
Remove a workspace with all its dashboards and metrics.
DELETE
Databrain deletes the workspace, its dashboards and its metrics. A workspace with a dashboard embedded in a data app cannot be deleted: remove the embed first.
curl --request DELETE \ "https://api.usedatabrain.com/api/v2/workspace?name=Customer%20analytics" \ --header "Authorization: Bearer $DATABRAIN_SERVICE_TOKEN"You cannot undo this. The dashboards and metrics of the workspace are deleted with it.
Auth
A service token. See Authentication.
ApiTokenheader
AuthorizationBearer <token>A service token or a data app API token.
Query
The workspace name. Encode spaces in the URL.
Response
{ "data": { "id": "Customer analytics", "message": "Workspace deleted successfully" }}id is the name you sent.
Errors
| Status | error.code | Why |
|---|---|---|
| 400 | INVALID_REQUEST_BODY | name is missing |
| 400 | WORKSPACE_ID_ERROR | No workspace has this name |
| 400 | WORKSPACE_HAS_EMBEDDED_DASHBOARDS | A dashboard of the workspace is embedded in a data app. Delete the embed first |
| 500 | INTERNAL_SERVER_ERROR | The delete failed |
For errors that every endpoint returns, see Authentication.
curl -X DELETE 'https://api.usedatabrain.com/api/v2/workspace?name=string'Example Response
{ "data": { "id": "Customer analytics", "message": "Workspace deleted successfully" }}