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.
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:
Go to your Databrain dashboard and open Settings.
Navigate to Settings.
Find the Service Tokens section.
Click the “Generate Token” button to generate a new service token if you don’t have one already.
Use this token as the Bearer value in your Authorization header.
Updated connection credentials for the datasource. Must include the name field matching the existing datasource name.
The credentials.name field must match the exact name of the existing datasource you want to update. This name is used to identify which datasource to update.
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.
Show Tenancy configuration details
TABLE level: Uses a dedicated table to map client identifiers
DATABASE level: Each client has a separate database
If the datasource doesn’t have existing tenancy settings, new settings will be created
If tenancy settings already exist, they will be updated with the new values
The credentials structure is the same as in Create Datasource. You must provide all required fields for the datasource type, even if only some values are changing.
When updating credentials, you must provide all required fields for the datasource type. Partial updates are not supported - provide the complete credential structure.