Skip to Content

Workspace APIs

List workspaces

Get every workspace in your organization and what it is connected to.

GET
/api/v2/workspace

The list has every workspace of your organization, also private ones made in the app.

curl "https://api.usedatabrain.com/api/v2/workspace?isPagination=true&pageNumber=1" \  --header "Authorization: Bearer $DATABRAIN_SERVICE_TOKEN"

Auth

A service token. See Authentication.

Authorization

ApiToken
headerAuthorizationBearer <token>

A service token or a data app API token.

Query

true returns 10 workspaces per page. Without it you get all.

pageNumberinteger

Page, from 1. Used only with isPagination=true

The order is not fixed and there is no total count.

Response

{  "data": [    {      "id": "9a7c1e2b-3d4f-4a5b-8c6d-7e8f9a0b1c2d",      "name": "Customer analytics",      "dataMartId": "0d2e7a3c-5b1f-4c9e-8a6d-3f4b2c1e0a9d",      "isMultiDatasource": false,      "isMultiDatamart": false,      "companyIntegration": null,      "datamart": { "id": "0d2e7a3c-5b1f-4c9e-8a6d-3f4b2c1e0a9d", "name": "Sales" }    }  ]}
FieldDescription
nameThe workspace name. Other endpoints take it as name or workspaceName
companyIntegrationThe datasource of a DATASOURCE workspace, or null
datamartThe datamart of a DATAMART workspace, or null
isMultiDatasource, isMultiDatamarttrue for a multi workspace

Errors

Statuserror.codeWhy
500INTERNAL_SERVER_ERRORThe list could not be read

For errors that every endpoint returns, see Authentication.

Example Request
curl -X GET 'https://api.usedatabrain.com/api/v2/workspace'
Example Response
{  "data": [    {      "name": "Customer analytics",      "id": "9a7c1e2b-3d4f-4a5b-8c6d-7e8f9a0b1c2d",      "dataMartId": "0d2e7a3c-5b1f-4c9e-8a6d-3f4b2c1e0a9d",      "isMultiDatasource": false,      "isMultiDatamart": false,      "companyIntegration": null,      "datamart": {        "id": "0d2e7a3c-5b1f-4c9e-8a6d-3f4b2c1e0a9d",        "name": "Sales"      }    }  ]}