Skip to Content

Workspace APIs

Delete a workspace

Remove a workspace with all its dashboards and metrics.

DELETE
/api/v2/workspace

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.

Authorization

ApiToken
headerAuthorizationBearer <token>

A service token or a data app API token.

Query

namestringrequired

The workspace name. Encode spaces in the URL.

Response

{  "data": {    "id": "Customer analytics",    "message": "Workspace deleted successfully"  }}

id is the name you sent.

Errors

Statuserror.codeWhy
400INVALID_REQUEST_BODYname is missing
400WORKSPACE_ID_ERRORNo workspace has this name
400WORKSPACE_HAS_EMBEDDED_DASHBOARDSA dashboard of the workspace is embedded in a data app. Delete the embed first
500INTERNAL_SERVER_ERRORThe delete failed

For errors that every endpoint returns, see Authentication.

Example Request
curl -X DELETE 'https://api.usedatabrain.com/api/v2/workspace?name=string'
Example Response
{  "data": {    "id": "Customer analytics",    "message": "Workspace deleted successfully"  }}