Create a new datasource connection to integrate your database or data warehouse with DataBrain. The API validates credentials, tests the connection, and automatically caches the schema for immediate use.
Before creating a datasource, ensure you have valid credentials for your database or data warehouse. The API will test the connection before creating the datasource. Supported datasource types include Snowflake, PostgreSQL, MySQL, BigQuery, Databricks, and many more.
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.
The type of datasource to create. Must be one of the supported datasource types.Supported types:
snowflake - Snowflake data warehouse
postgres - PostgreSQL database
redshift - Amazon Redshift
mysql - MySQL database
mongodb - MongoDB database
clickhouse - ClickHouse database
singlestore - SingleStore database
bigquery - Google BigQuery
databricks - Databricks
elasticsearch - Elasticsearch
opensearch - OpenSearch
mssql - Microsoft SQL Server
awss3 - Amazon S3
csv - CSV files
firebolt - Firebolt
athena - Amazon Athena
trino - Trino
Show Datasource type details
The datasource type determines which credential fields are required. Each datasource type has specific connection requirements documented in the credentials section.
Multi-tenant configuration for the datasource. Defines how data is isolated between different tenants/clients. Optional - if not provided, the datasource will be created without explicit tenancy settings.
Show Tenancy configuration details
TABLE level: Uses a dedicated table to map client identifiers
DATABASE level: Each client has a separate database
Optional - can be omitted if tenancy is handled at the application level