API ReferenceWarehouses

Warehouses API

Sources are connections to the data warehouses and databases where your customer data lives. SignalSmith supports Snowflake, BigQuery, and Databricks as source types.

Endpoints

MethodPathDescription
GET/api/v1/workspaces/{id}/sourcesList all sources
POST/api/v1/workspaces/{id}/sourcesCreate a source
GET/api/v1/workspaces/{id}/sources/{sourceId}Get a source
PUT/api/v1/workspaces/{id}/sources/{sourceId}Update a source
DELETE/api/v1/workspaces/{id}/sources/{sourceId}Delete a source
POST/api/v1/workspaces/{id}/sources/testTest a new connection (SSE)
POST/api/v1/workspaces/{id}/sources/{sourceId}/testTest an existing connection (SSE)

List Sources

GET /api/v1/workspaces/{id}/sources

Returns all sources in the workspace.

Response

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "workspace_id": "660e8400-e29b-41d4-a716-446655440000",
    "name": "Production Snowflake",
    "source_type": "snowflake",
    "config": {
      "account": "xy12345.us-east-1",
      "warehouse": "COMPUTE_WH",
      "database": "ANALYTICS",
      "schema": "PUBLIC"
    },
    "connection_id": null,
    "status": "connected",
    "status_error": "",
    "created_by": "770e8400-e29b-41d4-a716-446655440000",
    "created_at": "2024-01-15T09:30:00Z",
    "updated_at": "2024-01-15T09:30:00Z"
  }
]

Example

curl -X GET https://your-instance.signalsmith.io/api/v1/workspaces/{id}/sources \
  -H "Authorization: Bearer <token>" \
  -H "X-Workspace-ID: <workspace-id>"

Create Source

POST /api/v1/workspaces/{id}/sources

Creates a new source connection.

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name for the source
source_typestringYesOne of: snowflake, bigquery, databricks
configobjectYesConnection configuration (varies by source type)
connection_idstringNoID of a shared connection to use

Snowflake Config

{
  "name": "Production Snowflake",
  "source_type": "snowflake",
  "config": {
    "account": "xy12345.us-east-1",
    "warehouse": "COMPUTE_WH",
    "database": "ANALYTICS",
    "schema": "PUBLIC",
    "username": "cdp_user",
    "password": "...",
    "role": "CDP_ROLE"
  }
}

BigQuery Config

{
  "name": "Analytics BigQuery",
  "source_type": "bigquery",
  "config": {
    "project_id": "my-gcp-project",
    "dataset": "analytics",
    "credentials_json": "{...}"
  }
}

Databricks Config

{
  "name": "Databricks Lakehouse",
  "source_type": "databricks",
  "config": {
    "host": "adb-1234567890.azuredatabricks.net",
    "http_path": "/sql/1.0/warehouses/abc123",
    "token": "dapi...",
    "catalog": "main",
    "schema": "default"
  }
}

Response

Returns the created source with status 201 Created.

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "workspace_id": "660e8400-e29b-41d4-a716-446655440000",
  "name": "Production Snowflake",
  "source_type": "snowflake",
  "config": { "..." },
  "status": "pending",
  "status_error": "",
  "created_by": "770e8400-e29b-41d4-a716-446655440000",
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z"
}

Example

curl -X POST https://your-instance.signalsmith.io/api/v1/workspaces/{id}/sources \
  -H "Authorization: Bearer <token>" \
  -H "X-Workspace-ID: <workspace-id>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Snowflake",
    "source_type": "snowflake",
    "config": {
      "account": "xy12345.us-east-1",
      "warehouse": "COMPUTE_WH",
      "database": "ANALYTICS",
      "schema": "PUBLIC",
      "username": "cdp_user",
      "password": "secure_password"
    }
  }'

Get Source

GET /api/v1/workspaces/{id}/sources/{sourceId}

Returns a single source by ID.

Path Parameters

ParameterTypeDescription
idstring (UUID)Workspace ID
sourceIdstring (UUID)Source ID

Response

Returns the source object (same schema as list items).

Example

curl -X GET https://your-instance.signalsmith.io/api/v1/workspaces/{id}/sources/{sourceId} \
  -H "Authorization: Bearer <token>" \
  -H "X-Workspace-ID: <workspace-id>"

Update Source

PUT /api/v1/workspaces/{id}/sources/{sourceId}

Updates an existing source. You can update the name, config, or connection_id.

Request Body

FieldTypeRequiredDescription
namestringNoUpdated display name
configobjectNoUpdated connection configuration
connection_idstringNoUpdated shared connection ID
{
  "name": "Production Snowflake (Updated)",
  "config": {
    "account": "xy12345.us-east-1",
    "warehouse": "LARGE_WH",
    "database": "ANALYTICS",
    "schema": "PUBLIC",
    "username": "cdp_user",
    "password": "new_password"
  }
}

Response

Returns the updated source object.

Example

curl -X PUT https://your-instance.signalsmith.io/api/v1/workspaces/{id}/sources/{sourceId} \
  -H "Authorization: Bearer <token>" \
  -H "X-Workspace-ID: <workspace-id>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Snowflake (Updated)"
  }'

Delete Source

DELETE /api/v1/workspaces/{id}/sources/{sourceId}

Deletes a source. The source cannot be deleted if it has active models or syncs depending on it.

Response

{
  "status": "deleted"
}

Example

curl -X DELETE https://your-instance.signalsmith.io/api/v1/workspaces/{id}/sources/{sourceId} \
  -H "Authorization: Bearer <token>" \
  -H "X-Workspace-ID: <workspace-id>"

Test New Connection

POST /api/v1/workspaces/{id}/sources/test

Tests a connection using provided credentials before saving. The response is streamed via Server-Sent Events (SSE), delivering real-time progress for each test step.

Request Body

Same fields as the create request (source_type, config).

{
  "source_type": "snowflake",
  "config": {
    "account": "xy12345.us-east-1",
    "warehouse": "COMPUTE_WH",
    "database": "ANALYTICS",
    "schema": "PUBLIC",
    "username": "cdp_user",
    "password": "secure_password"
  }
}

Response (SSE Stream)

The response uses Content-Type: text/event-stream. Each test step emits a step event, followed by a final done event.

event: step
data: {"name":"connectivity","status":"passed","message":"Successfully connected to Snowflake"}

event: step
data: {"name":"authentication","status":"passed","message":"Credentials verified"}

event: step
data: {"name":"permissions","status":"passed","message":"Required permissions confirmed"}

event: done
data: {"success":true,"steps":[...]}

Example

curl -N -X POST https://your-instance.signalsmith.io/api/v1/workspaces/{id}/sources/test \
  -H "Authorization: Bearer <token>" \
  -H "X-Workspace-ID: <workspace-id>" \
  -H "Content-Type: application/json" \
  -d '{
    "source_type": "snowflake",
    "config": {
      "account": "xy12345.us-east-1",
      "warehouse": "COMPUTE_WH",
      "database": "ANALYTICS",
      "schema": "PUBLIC",
      "username": "cdp_user",
      "password": "secure_password"
    }
  }'

Test Existing Connection

POST /api/v1/workspaces/{id}/sources/{sourceId}/test

Tests the connection for an already-saved source using its stored credentials. Also streamed via SSE. On completion, the source’s status is updated based on the test result.

Response (SSE Stream)

event: step
data: {"name":"connectivity","status":"passed","message":"Successfully connected"}

event: done
data: {"success":true,"source":{...},"steps":[...]}

Example

curl -N -X POST https://your-instance.signalsmith.io/api/v1/workspaces/{id}/sources/{sourceId}/test \
  -H "Authorization: Bearer <token>" \
  -H "X-Workspace-ID: <workspace-id>"

Source Object

FieldTypeDescription
idstring (UUID)Unique identifier
workspace_idstring (UUID)Owning workspace
namestringDisplay name
source_typestringsnowflake, bigquery, or databricks
configobjectConnection configuration (credentials are masked in responses)
connection_idstring (UUID) or nullReference to a shared connection
statusstringpending, connected, or error
status_errorstringError message when status is error
created_bystring (UUID)Account that created the source
created_atstring (ISO 8601)Creation timestamp
updated_atstring (ISO 8601)Last update timestamp