Connections API
A connection links a source to a destination and defines how and when data syncs.
List Connections
GET /connections
curl "https://api.calabi.ai/v1/connections?workspaceId=YOUR_WORKSPACE_ID" \
-H "Authorization: Bearer $API_KEY"
Get Connection
GET /connections/{connectionId}
Create Connection
POST /connections
curl -X POST "https://api.calabi.ai/v1/connections" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Postgres → Snowflake",
"sourceId": "SOURCE_UUID",
"destinationId": "DEST_UUID",
"schedule": {
"scheduleType": "cron",
"cronExpression": "0 0 * * * ?"
},
"status": "active",
"namespaceDefinition": "destination",
"syncCatalog": {
"streams": [
{
"stream": { "name": "users", "namespace": "public" },
"config": {
"syncMode": "incremental",
"destinationSyncMode": "append_dedup",
"cursorField": ["updated_at"],
"primaryKey": [["id"]]
}
}
]
}
}'
Schedule types
| Type | Description |
|---|---|
manual | Triggered on demand only |
cron | Runs on a cron schedule |
Sync modes
| Source mode | Destination mode | Behaviour |
|---|---|---|
full_refresh | overwrite | Replace all rows |
full_refresh | append | Append all rows |
incremental | append | Add new rows only |
incremental | append_dedup | Upsert by primary key |
Update Connection
PATCH /connections/{connectionId}
Delete Connection
DELETE /connections/{connectionId}