Skip to main content

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

TypeDescription
manualTriggered on demand only
cronRuns on a cron schedule

Sync modes

Source modeDestination modeBehaviour
full_refreshoverwriteReplace all rows
full_refreshappendAppend all rows
incrementalappendAdd new rows only
incrementalappend_dedupUpsert by primary key

Update Connection

PATCH /connections/{connectionId}


Delete Connection

DELETE /connections/{connectionId}