Workspace APIs
Update Workspace
Update an existing workspace’s connection settings to change datasource, datamart, multi-datasource, or multi-datamart configuration.
PUT
Update the connection settings of an existing workspace. You can switch between datasource, datamart, multi-datasource, and multi-datamart configurations. Updating a workspace also updates all associated metrics to use the new connection.Documentation Index
Fetch the complete documentation index at: https://docs.usedatabrain.com/llms.txt
Use this file to discover all available pages before exploring further.
The workspace name is used to identify which workspace to update and cannot be changed through this endpoint. To rename a workspace, you’ll need to create a new one and migrate your content.
Authentication
This endpoint requires a service token in the Authorization header. Service tokens differ from data app API keys and provide organization-level permissions. To access your service token:- In Settings page, navigate to the Service Tokens section.
- Click the “Generate Token” button to create a new service token if you don’t have one already.
Headers
Bearer token for API authentication. Use your service token.
Must be set to
application/json for all requests.Request Body
Name of the existing workspace to update. Must match exactly (case-sensitive).
New connection type for the workspace. Must be one of:
DATASOURCE, DATAMART, MULTI_DATASOURCE, or MULTI_DATAMART.Name of the datasource to connect to this workspace.Required when
connectionType is DATASOURCE.Name of the datamart to connect to this workspace.Required when
connectionType is DATAMART.Optional primary LLM name for workspace-level AI features. Must match an existing LLM configured in your organization.
Optional list of LLM names available for AI Copilot in this workspace. Every value must match an existing organization LLM name.
Optional flag to enable or disable AI-powered metric suggestions for this workspace.
Optional flag to enable or disable AI-generated metric summaries for this workspace.
Summary mode used when metric summaries are enabled. Must be one of:
technicalAndInsightSummary, forecastAndTrendAnalysis, comparativeAndAnomalyDetection, custom.Required when isEnableMetricSummary is true.Custom summary instruction prompt for AI-generated summaries.Required when
summaryType is custom.Optional workspace theme name. Must match an existing theme configured in your organization.
Response
Contains the updated workspace information on success.
Error object if the request failed, otherwise
null for successful requests.Examples
HTTP Status Code Summary
| Status Code | Description |
|---|---|
200 | OK - Workspace updated successfully |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Invalid or missing API key |
500 | Internal Server Error - Server error occurred |
Possible Errors
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_REQUEST_BODY | 400 | Missing or invalid parameters |
WORKSPACE_DOES_NOT_EXIST | 400 | Workspace not found |
INVALID_DATASOURCE_NAME | 400 | Datasource not found |
INVALID_DATAMART_NAME | 400 | Datamart not found |
INVALID_LLM_NAME | 400 | Invalid LLM name provided |
INVALID_AI_COPILOT_LLMS | 400 | Invalid AI Copilot LLM list |
INVALID_THEME_NAME | 400 | Invalid theme name provided |
INVALID_DATA_APP_API_KEY | 401 | Invalid API key |
INTERNAL_SERVER_ERROR | 500 | Server error |

