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
| Method | Path | Description |
|---|---|---|
GET | /api/v1/workspaces/{id}/sources | List all sources |
POST | /api/v1/workspaces/{id}/sources | Create 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/test | Test a new connection (SSE) |
POST | /api/v1/workspaces/{id}/sources/{sourceId}/test | Test 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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the source |
source_type | string | Yes | One of: snowflake, bigquery, databricks |
config | object | Yes | Connection configuration (varies by source type) |
connection_id | string | No | ID 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
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | Workspace ID |
sourceId | string (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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Updated display name |
config | object | No | Updated connection configuration |
connection_id | string | No | Updated 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
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique identifier |
workspace_id | string (UUID) | Owning workspace |
name | string | Display name |
source_type | string | snowflake, bigquery, or databricks |
config | object | Connection configuration (credentials are masked in responses) |
connection_id | string (UUID) or null | Reference to a shared connection |
status | string | pending, connected, or error |
status_error | string | Error message when status is error |
created_by | string (UUID) | Account that created the source |
created_at | string (ISO 8601) | Creation timestamp |
updated_at | string (ISO 8601) | Last update timestamp |