Skip to main content
POST
https://sandbox.getcollate.io/api
/
v1
/
services
/
databaseServices
POST /v1/services/databaseServices
from metadata.sdk import configure
from metadata.sdk.entities import DatabaseServices
from metadata.generated.schema.api.services.createDatabaseService import CreateDatabaseServiceRequest

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

request = CreateDatabaseServiceRequest(
    name="snowflake_prod",
    displayName="Snowflake Production",
    serviceType="Snowflake",
    description="Production Snowflake data warehouse",
    connection={
        "config": {
            "account": "xy12345.us-east-1",
            "username": "ingestion_user",
            "password": "***",
            "warehouse": "COMPUTE_WH",
            "database": "ANALYTICS"
        }
    }
)

service = DatabaseServices.create(request)
print(f"Created: {service.fullyQualifiedName}")
{
  "id": "fd2193af-fe09-4366-92b7-1e0d01cd8c09",
  "name": "sample_data",
  "fullyQualifiedName": "sample_data",
  "serviceType": "BigQuery",
  "description": "Sample data service for BigQuery",
  "version": 0.1,
  "updatedAt": 1769982650000,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/services/databaseServices/fd2193af-fe09-4366-92b7-1e0d01cd8c09",
  "connection": {
    "config": {
      "type": "BigQuery",
      "scheme": "bigquery",
      "hostPort": "bigquery.googleapis.com",
      "taxonomyProjectID": [],
      "taxonomyLocation": "us",
      "usageLocation": "us",
      "supportsMetadataExtraction": true,
      "supportsUsageExtraction": true,
      "supportsLineageExtraction": true,
      "supportsDBTExtraction": true,
      "supportsProfiler": true,
      "supportsQueryComment": true
    }
  },
  "owners": [],
  "tags": [],
  "deleted": false,
  "domains": [],
  "entityStatus": "Unprocessed"
}

Create a Database Service

Create a new database service connection to a platform such as Snowflake, BigQuery, or PostgreSQL.

Body Parameters

name
string
required
Name of the database service. Must be unique across all database services.
serviceType
string
required
Type of database service (e.g., Snowflake, BigQuery, PostgreSQL, MySQL, Redshift, Databricks).
description
string
Description of the database service in Markdown format.
displayName
string
Human-readable display name for the database service.
connection
object
Connection configuration specific to the service type.
owners
array
Array of owner references (users or teams) to assign to the service.
domain
string
Fully qualified name of the domain to assign for governance purposes.
tags
array
Array of classification tags to apply to the database service.
POST /v1/services/databaseServices
from metadata.sdk import configure
from metadata.sdk.entities import DatabaseServices
from metadata.generated.schema.api.services.createDatabaseService import CreateDatabaseServiceRequest

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

request = CreateDatabaseServiceRequest(
    name="snowflake_prod",
    displayName="Snowflake Production",
    serviceType="Snowflake",
    description="Production Snowflake data warehouse",
    connection={
        "config": {
            "account": "xy12345.us-east-1",
            "username": "ingestion_user",
            "password": "***",
            "warehouse": "COMPUTE_WH",
            "database": "ANALYTICS"
        }
    }
)

service = DatabaseServices.create(request)
print(f"Created: {service.fullyQualifiedName}")
{
  "id": "fd2193af-fe09-4366-92b7-1e0d01cd8c09",
  "name": "sample_data",
  "fullyQualifiedName": "sample_data",
  "serviceType": "BigQuery",
  "description": "Sample data service for BigQuery",
  "version": 0.1,
  "updatedAt": 1769982650000,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/services/databaseServices/fd2193af-fe09-4366-92b7-1e0d01cd8c09",
  "connection": {
    "config": {
      "type": "BigQuery",
      "scheme": "bigquery",
      "hostPort": "bigquery.googleapis.com",
      "taxonomyProjectID": [],
      "taxonomyLocation": "us",
      "usageLocation": "us",
      "supportsMetadataExtraction": true,
      "supportsUsageExtraction": true,
      "supportsLineageExtraction": true,
      "supportsDBTExtraction": true,
      "supportsProfiler": true,
      "supportsQueryComment": true
    }
  },
  "owners": [],
  "tags": [],
  "deleted": false,
  "domains": [],
  "entityStatus": "Unprocessed"
}

Returns

Returns the created database service object with all specified properties and system-generated fields.

Response

id
string
Unique identifier for the database service (UUID format).
name
string
Database service name.
fullyQualifiedName
string
Fully qualified name of the service.
displayName
string
Human-readable display name.
description
string
Description of the database service in Markdown format.
serviceType
string
Type of database service (e.g., Snowflake, BigQuery, PostgreSQL).
connection
object
Connection configuration for the service.
owners
array
List of owners assigned to the database service.
domain
string
Fully qualified name of the assigned domain.
tags
array
Classification tags applied to the database service.
version
number
Version number for the entity (starts at 0.1).

Create or Update (PUT)

Use PUT /v1/services/databaseServices instead of POST to perform an upsert. If a database service with the same fullyQualifiedName already exists, it will be updated; otherwise, a new service is created. The request body is the same as POST.
curl -X PUT "{base_url}/api/v1/services/databaseServices" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{ ... same body as POST ... }'
PUT will not return a 409 conflict error if the entity already exists — it will update the existing entity instead.

Bulk Create or Update (PUT)

Use PUT /v1/services/databaseServices/bulk to create or update multiple database services in a single request. The request body is an array of create request objects.
curl -X PUT "{base_url}/api/v1/services/databaseServices/bulk" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '[
    { "name": "service_one", "serviceType": "Snowflake", "connection": { "config": {} } },
    { "name": "service_two", "serviceType": "BigQuery", "connection": { "config": {} } }
  ]'

Error Handling

CodeError TypeDescription
400BAD_REQUESTInvalid request body or missing required fields
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to create database services
409ENTITY_ALREADY_EXISTSDatabase service with same name already exists (POST only)