Skip to content

HTTP API / Sources

Sources API ​

11 operations. Paths are relative to the API host (http://localhost:5080 in local development). Every operation accepts an OIDC bearer token (Authorization: Bearer …) or a workspace API key (X-Api-Key: keel_live_…); errors are RFC 9457 Problem Details with a code (error codes). Permissions: matrix.

MethodPathSummary
GET/api/v1/connection-schemasSource kinds and the fields of their connect wizard (F02).
GET/api/v1/workspaces/{workspaceId}/sourcesData sources of a workspace.
POST/api/v1/workspaces/{workspaceId}/sourcesRegister a data source. The secret goes to the secret store; only a reference is kept.
GET/api/v1/workspaces/{workspaceId}/sources/{sourceId}One data source with its last Test connection checklist (never the secret).
PUT/api/v1/workspaces/{workspaceId}/sources/{sourceId}Change connection details, scope or profiling policy.
DELETE/api/v1/workspaces/{workspaceId}/sources/{sourceId}Delete a data source (soft delete, audited; its secret is destroyed).
POST/api/v1/workspaces/{workspaceId}/sources/{sourceId}:testQueue Test connection; the checklist is stored on the source when the job completes.
PUT/api/v1/workspaces/{workspaceId}/sources/{sourceId}/drift-scheduleWhen drift scans run for the source (F16; five-field cron, UTC), or turn them off.
PUT/api/v1/workspaces/{workspaceId}/sources/{sourceId}/secretReplace the password or key (write-only).
GET/api/v1/workspaces/{workspaceId}/sources/sampleWhether this deployment offers the sample warehouse (F21 onboarding), and the workspace's sample source if added.
POST/api/v1/workspaces/{workspaceId}/sources/sampleAdd the read-only sample warehouse as a source (F21 'Explore with sample data'); idempotent. Start its scan with ScanDataSource.

ListConnectionSchemas ​

http
GET /api/v1/connection-schemas

Source kinds and the fields of their connect wizard (F02).

StatusDescriptionBody
200OKConnectionSchemaDto[]

ListDataSources ​

http
GET /api/v1/workspaces/{workspaceId}/sources

Data sources of a workspace.

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
pagequeryint32no
pageSizequeryint32no
StatusDescriptionBody
200OKPagedResultOfDataSourceSummary

Response 200: PagedResultOfDataSourceSummary

FieldTypeNotes
hasNextboolean
itemsDataSourceSummary[]
pageint32
pageSizeint32
totalCountint64

RegisterDataSource ​

http
POST /api/v1/workspaces/{workspaceId}/sources

Register a data source. The secret goes to the secret store; only a reference is kept.

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes

Request body (application/json): RegisterDataSourceRequest

FieldTypeNotes
agentIduuid?PrivateAgent mode: the agent the source connects through (ADR-0006).
agentPoolstring?PrivateAgent mode (F22): an agent pool instead of one agent; any healthy agent of the pool runs the work.
agentSecretNamestring?PrivateAgent mode: the name of the secret in the agent's local secret store (the value never reaches Keel).
databasestring
excludestring[]?
hoststring
includestring[]?
kindSourceKindOne of PostgreSql, SqlServer, MySql, Snowflake, BigQuery, Databricks, Oracle, Redshift
namestring
networkModeNetworkModeOne of Direct, PrivateAgent
optionsobject?
portint32?
profilingProfilingPolicyDto?
secretstringPassword / key / service-account JSON. Write-only: never returned by any endpoint (F02 FR3). Empty for private-agent sources.
usernamestring
StatusDescriptionBody
201CreatedCreatedResponse

Response 201: CreatedResponse

FieldTypeNotes
iduuid

GetDataSource ​

http
GET /api/v1/workspaces/{workspaceId}/sources/{sourceId}

One data source with its last Test connection checklist (never the secret).

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
sourceIdpathuuidyes
StatusDescriptionBody
200OKDataSourceDetail

Response 200: DataSourceDetail

FieldTypeNotes
agentIduuid?
agentPoolstring?
agentSecretNamestring?
createdAtdate-time
databasestring
driftScheduleDriftScheduleDto
excludestring[]
hasSecretboolean
hoststring
iduuid
includestring[]
kindSourceKindOne of PostgreSql, SqlServer, MySql, Snowflake, BigQuery, Databricks, Oracle, Redshift
lastChecksConnectionCheckDto[]
lastScanAtdate-time?
lastScanErrorstring?
lastScanStatusstring?
lastTestedAtdate-time?
namestring
networkModeNetworkModeOne of Direct, PrivateAgent
optionsobject
portint32?
profilingProfilingPolicyDto
statusDataSourceStatusOne of Untested, Healthy, Degraded, Failing
tablesInScopeint32?
usernamestring
workspaceIduuid

UpdateDataSource ​

http
PUT /api/v1/workspaces/{workspaceId}/sources/{sourceId}

Change connection details, scope or profiling policy.

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
sourceIdpathuuidyes

Request body (application/json): UpdateDataSourceRequest

FieldTypeNotes
agentIduuid?
agentPoolstring?
agentSecretNamestring?
databasestring
excludestring[]?
hoststring
includestring[]
namestring
networkModeNetworkModeOne of Direct, PrivateAgent
optionsobject?
portint32?
profilingProfilingPolicyDto?
usernamestring
StatusDescriptionBody
204No Content—

DeleteDataSource ​

http
DELETE /api/v1/workspaces/{workspaceId}/sources/{sourceId}

Delete a data source (soft delete, audited; its secret is destroyed).

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
sourceIdpathuuidyes
StatusDescriptionBody
204No Content—

TestDataSource ​

http
POST /api/v1/workspaces/{workspaceId}/sources/{sourceId}:test

Queue Test connection; the checklist is stored on the source when the job completes.

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
sourceIdpathuuidyes
StatusDescriptionBody
202AcceptedJobAccepted

Response 202: JobAccepted

FieldTypeNotes
jobIduuid

SetDriftSchedule ​

http
PUT /api/v1/workspaces/{workspaceId}/sources/{sourceId}/drift-schedule

When drift scans run for the source (F16; five-field cron, UTC), or turn them off.

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
sourceIdpathuuidyes

Request body (application/json): DriftScheduleRequest

FieldTypeNotes
cronstringFive-field cron, UTC (e.g. 0 3 * * *, daily at 03:00).
enabledboolean
StatusDescriptionBody
204No Content—

RotateDataSourceSecret ​

http
PUT /api/v1/workspaces/{workspaceId}/sources/{sourceId}/secret

Replace the password or key (write-only).

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
sourceIdpathuuidyes

Request body (application/json): RotateSecretRequest

FieldTypeNotes
secretstring
StatusDescriptionBody
204No Content—

GetSampleSource ​

http
GET /api/v1/workspaces/{workspaceId}/sources/sample

Whether this deployment offers the sample warehouse (F21 onboarding), and the workspace's sample source if added.

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
StatusDescriptionBody
200OKSampleSourceStatus

Response 200: SampleSourceStatus

FieldTypeNotes
availableboolean
namestring?
sourceIduuid?

RegisterSampleSource ​

http
POST /api/v1/workspaces/{workspaceId}/sources/sample

Add the read-only sample warehouse as a source (F21 'Explore with sample data'); idempotent. Start its scan with ScanDataSource.

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
StatusDescriptionBody
201CreatedCreatedResponse

Response 201: CreatedResponse

FieldTypeNotes
iduuid

Anchor Keel is a working product name: one platform, a shared core and licensed modules (Keel Semantic, Keel Migrate). Documentation built from the repository — facts are derived from code, ADRs and the decisions log.