Workspace APIs
List workspaces
Get every workspace in your organization and what it is connected to.
GET
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.
ApiTokenheader
AuthorizationBearer <token>A service token or a data app API token.
Query
isPaginationstring
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" } } ]}| Field | Description |
|---|---|
name | The workspace name. Other endpoints take it as name or workspaceName |
companyIntegration | The datasource of a DATASOURCE workspace, or null |
datamart | The datamart of a DATAMART workspace, or null |
isMultiDatasource, isMultiDatamart | true for a multi workspace |
Errors
| Status | error.code | Why |
|---|---|---|
| 500 | INTERNAL_SERVER_ERROR | The list could not be read |
For errors that every endpoint returns, see Authentication.
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" } } ]}