Skip to main content
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.
Important: Updating a workspace connection will automatically update all metrics in that workspace to use the new datasource or datamart connection. Ensure the new connection has compatible table and column structures to avoid breaking existing metrics.
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:
  1. In Settings page, navigate to the Service Tokens section.
  2. Click the “Generate Token” button to create a new service token if you don’t have one already.
Use this token as the Bearer value in your Authorization header.

Headers

Authorization
string
required
Bearer token for API authentication. Use your service token.
Content-Type
string
required
Must be set to application/json for all requests.

Request Body

name
string
required
Name of the existing workspace to update. Must match exactly (case-sensitive).
connectionType
string
required
New connection type for the workspace. Must be one of: DATASOURCE, DATAMART, MULTI_DATASOURCE, or MULTI_DATAMART.
datasourceName
string
Name of the datasource to connect to this workspace.Required when connectionType is DATASOURCE.
datamartName
string
Name of the datamart to connect to this workspace.Required when connectionType is DATAMART.
llmName
string
Optional primary LLM name for workspace-level AI features. Must match an existing LLM configured in your organization.
aiCopilotLlms
array
Optional list of LLM names available for AI Copilot in this workspace. Every value must match an existing organization LLM name.
isEnableMetricSuggestions
boolean
Optional flag to enable or disable AI-powered metric suggestions for this workspace.
isEnableMetricSummary
boolean
Optional flag to enable or disable AI-generated metric summaries for this workspace.
summaryType
string
Summary mode used when metric summaries are enabled. Must be one of: technicalAndInsightSummary, forecastAndTrendAnalysis, comparativeAndAnomalyDetection, custom.Required when isEnableMetricSummary is true.
customSummaryPrompt
string
Custom summary instruction prompt for AI-generated summaries.Required when summaryType is custom.
themeName
string
Optional workspace theme name. Must match an existing theme configured in your organization.

Response

data
object
Contains the updated workspace information on success.
error
null | object
Error object if the request failed, otherwise null for successful requests.

Examples

HTTP Status Code Summary

Possible Errors