Skip to content

Microsoft SQL Server Microsoft SQL Server API

This page documents Microsoft SQL Server payloads for the datastore API: sample requests with placeholder values to replace with your own. For generic operations (get, list, update, delete, multi-schema bulk), see Datastore API.

Complete API Reference

For the full interactive API documentation with all request/response schemas, visit the API docs.

Each example includes endpoint details, sample payloads, and instructions on how to replace placeholder values with actual data relevant to your setup.

Creating a Source Datastore

This section provides sample payloads for creating a Microsoft SQL Server datastore. Replace the placeholder values with actual data relevant to your setup.

Endpoint: /api/datastores (post)

{
    "name": "your_datastore_name",
    "teams": ["Public"],
    "database": "sqlserver_database",
    "schema": "sqlserver_schema",
    "enrichment_only": false,
    "trigger_sync": true,
    "connection": {
        "name": "your_connection_name",
        "type": "sqlserver",
        "host": "sqlserver_host",
        "port": 1433,
        "username": "sqlserver_username",
        "password": "sqlserver_password"
    }
}
{
    "name": "your_datastore_name",
    "teams": ["Public"],
    "database": "sqlserver_database",
    "schema": "sqlserver_schema",
    "enrichment_only": false,
    "trigger_sync": true,
    "connection": {
        "name": "your_connection_name",
        "type": "sqlserver",
        "host": "sqlserver_host",
        "port": 1433,
        "username": "application_client_id",
        "password": "client_secret",
        "parameters": {
            "authentication_type": "SERVICE_PRINCIPAL",
            "tenant_id": "azure_ad_tenant_id"
        }
    }
}
{
    "name": "your_datastore_name",
    "teams": ["Public"],
    "database": "sqlserver_database",
    "schema": "sqlserver_schema",
    "enrichment_only": false,
    "trigger_sync": true,
    "connection_id": 123
}
# Step 1: Create a Connection
qualytics connections create \
    --type sqlserver \
    --name "your_connection_name" \
    --host ${SQLSERVER_HOST} \
    --port 1433 \
    --username ${SQLSERVER_USER} \
    --password ${SQLSERVER_PASSWORD}

# Step 2: Create a Source Datastore
qualytics datastores create \
    --name "your_datastore_name" \
    --connection-name "your_connection_name" \
    --database your_database \
    --schema dbo

Service Principal credentials

With Service Principal authentication, the Client ID is sent as username and the Client Secret as password. The authentication type and the Tenant ID go under connection.parameters.

Port

port takes a number, and it is optional. Leave it out to use 1433.

Create an Enrichment Datastore

This section provides sample payloads for creating an enrichment datastore. Replace the placeholder values with actual data relevant to your setup.

Endpoint: /api/datastores (post)

{
    "name": "your_datastore_name",
    "teams": ["Public"],
    "database": "sqlserver_database",
    "schema": "sqlserver_enrichment_schema",
    "enrichment_only": true,
    "connection": {
        "name": "your_connection_name",
        "type": "sqlserver",
        "host": "sqlserver_host",
        "port": 1433,
        "username": "sqlserver_username",
        "password": "sqlserver_password"
    }
}
{
    "name": "your_datastore_name",
    "teams": ["Public"],
    "database": "sqlserver_database",
    "schema": "sqlserver_enrichment_schema",
    "enrichment_only": true,
    "connection_id": 123
}
# Step 1: Create a Connection
qualytics connections create \
    --type sqlserver \
    --name "your_connection_name" \
    --host ${SQLSERVER_HOST} \
    --port 1433 \
    --username ${SQLSERVER_USER} \
    --password ${SQLSERVER_PASSWORD}

# Step 2: Create an Enrichment Datastore
qualytics datastores create \
    --name "your_datastore_name" \
    --connection-name "your_connection_name" \
    --database your_database \
    --schema your_enrichment_schema \
    --enrichment-only

Use the provided endpoint to link a datastore to its enrichment destination:

Endpoint Details: /api/datastores/{datastore-id}/enrichment/{enrichment-id} (patch)