Manage tenants
Create a tenant
- Documentation
- API references
- Introduction
- POSTGenerate user auth token
- POSTChat
- POSTCreate a data source
API references
Auth tokens
Chat via API
Data sources
Manage tenants
Create a tenant
Create a Single Tenant
curl --request POST \
--url https://api.buster.so/api/v1/tenants \
--header 'Content-Type: application/json' \
--header 'api-key: <YOUR-API-KEY>' \
--data '{
"source_name": "buster_tenant_2",
"credentials": {
"postgres": {
"source_name": "tenant_number_1",
"db_host": "rds.amazonaws.com",
"db_port": "5432",
"db_username": "postgres",
"db_password": "supersecret",
"db_database": "postgres",
"schemas": ["public"],
"jump_host": "jump_host.amazonaws.com",
"ssh_username": "ec2-user",
"ssh_private_key": "path/to/file"
}
}
}'
201 Created
This endpoint is only useful for single-tenant data sources.
Body Parameters
template_id
string
requiredThis is the identifier for the template you can find in the data source under the “Settings” tab.
credentials
string
requiredThese are the credentials for the new tenant.
"postgres": {
"source_name": "tenant_number_1",
"db_host": "rds.amazonaws.com",
"db_port": "5432",
"db_username": "postgres",
"db_password": "supersecret",
"db_database": "postgres",
"schemas": ["public"],
"jump_host": "jump_host.amazonaws.com",
"ssh_username": "ec2-user",
"ssh_private_key": "path/to/file"
}
"mysql": {
"source_name": "tenant_number_1",
"db_host": "rds.amazonaws.com",
"db_port": "3306",
"db_username": "admin",
"db_password": "supersecret",
"databases": ["public"],
"jump_host": "jump_host.amazonaws.com",
"ssh_username": "ec2-user",
"ssh_private_key": "path/to/file"
}
"mariadb": {
"source_name": "tenant_number_1",
"db_host": "rds.amazonaws.com",
"db_port": "3306",
"db_username": "admin",
"db_password": "supersecret",
"databases": ["public"],
"jump_host": "jump_host.amazonaws.com",
"ssh_username": "ec2-user",
"ssh_private_key": "path/to/file"
}
"sqlserver": {
"source_name": "tenant_number_1",
"db_host": "rds.amazonaws.com",
"db_port": "1433",
"db_username": "admin",
"db_password": "supersecret",
"db_database": "master",
"schemas": ["public"],
"jump_host": "jump_host.amazonaws.com",
"ssh_username": "ec2-user",
"ssh_private_key": "path/to/file"
}
"bigquery": {
"source_name": "tenant_number_1",
"credentials_json": "\"{\"type\":\"service_account\",\"project_id\":\"buster-project\",\"private_key_id\":\"1234567890\",\...\"}",
"project_id": "buster-project"
"dataset_ids": ["dataset_1", "dataset_2"]
}
"redshift": {
"source_name": "tenant_number_1",
"db_host": "rds.amazonaws.com",
"db_port": "5432",
"db_username": "postgres",
"db_password": "supersecret",
"db_database": "postgres",
"schemas": ["public"],
}
"databricks": {
"source_name": "tenant_number_1",
"host": "warehouse.databricks.com",
"api_key": "db-1234...",
"warehouse_id": "wh-1234554",
"catalog_name": "buster_catalog",
"schemas": ["public"],
}
Was this page helpful?
curl --request POST \
--url https://api.buster.so/api/v1/tenants \
--header 'Content-Type: application/json' \
--header 'api-key: <YOUR-API-KEY>' \
--data '{
"source_name": "buster_tenant_2",
"credentials": {
"postgres": {
"source_name": "tenant_number_1",
"db_host": "rds.amazonaws.com",
"db_port": "5432",
"db_username": "postgres",
"db_password": "supersecret",
"db_database": "postgres",
"schemas": ["public"],
"jump_host": "jump_host.amazonaws.com",
"ssh_username": "ec2-user",
"ssh_private_key": "path/to/file"
}
}
}'
201 Created