Datasource APIs
Update Datasource
Update the credentials and configuration of an existing datasource. The API validates and tests the new credentials before applying changes.
PUT
Update an existing datasource’s credentials or configuration. The API validates the new credentials, tests the connection, and automatically refreshes the cached schema.
You can only update datasources that already exist in your organization. The datasource is identified by the
name field in the credentials. After updating, the schema will be automatically re-cached.Endpoint
Self-hosted Databrain Endpoint
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
Request Body
The type of datasource. Must match the existing datasource type. See Create Datasource for supported types.
Updated connection credentials for the datasource. Must include the
name field matching the existing datasource name.Multi-tenant configuration for the datasource. Defines how data is isolated between different tenants/clients. Optional - if not provided, existing tenancy settings will remain unchanged.
The level at which tenant isolation occurs. Must be one of:
TABLE or DATABASE.TABLE: Client mapping is stored in a specific table (most common)DATABASE: Each client has a separate database instance
tenancySettings is provided. If tenancySettings is omitted, this field is not needed.Data type of the client identifier column. Must be either
NUMBER or STRING.Required when tenancyLevel is TABLE.Name of the table that contains client mapping information.Required when
tenancyLevel is TABLE.Column name in the mapping table that stores the client identifier.Required when
tenancyLevel is TABLE.Datasource-Specific Credentials
You must provide all required fields for the datasource type, even if only some values are changing. Partial updates are not supported.When updating credentials, provide the complete credential structure for the datasource type. Partial updates are not supported.
Datasource-specific credential fields. The required fields depend on the
datasourceType.Snowflake
Snowflake
Postgres / Redshift
Postgres / Redshift
CockroachDB
CockroachDB
BigQuery
BigQuery
MySQL / MongoDB / ClickHouse
MySQL / MongoDB / ClickHouse
MSSQL
MSSQL
SingleStore
SingleStore
Databricks
Databricks
Elasticsearch
Elasticsearch
Disable authentication (optional, default
false). Only valid when server_type is "self-managed".OpenSearch
OpenSearch
Disable authentication (optional, default
false). Only valid when server_type is "self-managed".Firebolt
Firebolt
Athena
Athena
Trino
Trino
Response
Examples
Error Codes
Next Steps
List Datasources
View all datasources to verify the update
Sync Datasource
Manually sync the datasource schema if needed
Create Datasource
Create a new datasource instead of updating
Delete Datasource
Remove a datasource you no longer need

