ImportSources


GET /{o}/{p}/import-sources

List import sources

List registered cross-source drift import sources for this project.

Auth: Bearer token required · Permission: data:read

Path parameters

NameTypeDescription
ostring
pstring

Responses

StatusDescriptionSchema
200OKImportSourceList
401UnauthorizedError
403ForbiddenError

POST /{o}/{p}/import-sources

Register (or refresh) an import source

Idempotent registration keyed on (project, uri). Returns 201 for a new source, 200 when refreshing an existing one. On a refresh, an omitted name/labels keeps the value already on file — only an explicit labels: null clears the label map — so a routine re-import that never sends labels cannot silently erase a one-time label set.

Auth: Bearer token required · Permission: import-sources:write

Path parameters

NameTypeDescription
ostring
pstring

Request body (application/json)

FieldTypeDescription
namestringAddressable source name, unique per project. Defaults to the URI on first registration; omit on a refresh to keep the name already on file.
labelsobject | nullR6 default labels stamped onto entities ingested from this source. Omit to leave the current labels untouched on a refresh (first registration defaults to none); pass null to explicitly clear them.
sourceKindtf-state | atmos-manifests(required)
sourceUristringCanonical source URI (any accepted spelling; normalized on the way in) (required)
reconciliationPolicyauto-update | human-approval

Responses

StatusDescriptionSchema
200OKImportSource
201CreatedImportSource
401UnauthorizedError
403ForbiddenError

GET /{o}/{p}/import-sources/{id}/drift

Get drift summary for an import source

Per-entity drift status and pending proposals for the entities synced from this source.

Auth: Bearer token required · Permission: data:read

Path parameters

NameTypeDescription
ostring
pstring
idstring

Responses

StatusDescriptionSchema
200OKImportSourceDrift
401UnauthorizedError
403ForbiddenError
404Not FoundError

GET /{o}/{p}/import-sources/{id}

Get an import source by id

Auth: Bearer token required · Permission: data:read

Path parameters

NameTypeDescription
ostring
pstring
idstring

Responses

StatusDescriptionSchema
200OKImportSource
401UnauthorizedError
403ForbiddenError
404Not FoundError

DELETE /{o}/{p}/import-sources/{id}

Delete an import source and everything imported from it

Destroys the source and every entity whose identity partitions by it, and — through those entities — every relationship and cell membership that references one, via ON DELETE CASCADE. Re-import recreates them. A relationship whose OTHER endpoint lives in a still-live source is destroyed too: an edge cascades off either endpoint, not only the one on the deleted source. apply:write, because destroying a source destroys its data.

Auth: Bearer token required · Permission: apply:write

Path parameters

NameTypeDescription
ostring
pstring
idstring

Responses

StatusDescriptionSchema
200OKDeletedById
401UnauthorizedError
403ForbiddenError
404Not FoundError

POST /{o}/{p}/import-sources/{id}/rescan

Rescan an import source

Reconcile the source's declarations against the catalog. Auto-update applies directly; human-approval creates drift proposals for existing entities.

Auth: Bearer token required · Permission: import-sources:write

Path parameters

NameTypeDescription
ostring
pstring
idstring

Request body (application/json)

FieldTypeDescription
itemsobject | object | object | object | object | object | object | object | object[](required)
deletionsobject[]

Responses

StatusDescriptionSchema
200OKImportSourceRescanResult
401UnauthorizedError
403ForbiddenError
404Not FoundError

POST /{o}/{p}/import-sources/{id}/drift-proposals/{proposalId}/approve

Approve a drift proposal

Apply the proposed changes to the target entity and mark the proposal approved.

Auth: Bearer token required · Permission: import-sources:write

Path parameters

NameTypeDescription
ostring
pstring
idstring
proposalIdstring

Responses

StatusDescriptionSchema
200OKDriftProposal
401UnauthorizedError
403ForbiddenError
404Not FoundError
409ConflictError

POST /{o}/{p}/import-sources/{id}/drift-proposals/{proposalId}/reject

Reject a drift proposal

Mark the proposal rejected without changing the target entity.

Auth: Bearer token required · Permission: import-sources:write

Path parameters

NameTypeDescription
ostring
pstring
idstring
proposalIdstring

Responses

StatusDescriptionSchema
200OKDriftProposal
401UnauthorizedError
403ForbiddenError
404Not FoundError
409ConflictError

Schemas

CellSelector

FieldTypeDescription
matchCellSelectorTerm[](required)

CellSelectorEqualsTerm

FieldTypeDescription
propertystring(required)
equalsstring(required)

CellSelectorInTerm

FieldTypeDescription
propertystring(required)
instring[](required)

CellSelectorTerm

DeletedById

FieldTypeDescription
deletedtrue(required)
idstring(required)

DriftProposal

FieldTypeDescription
idstring(uuid)(required)
importSourceIdstring(uuid)(required)
projectIdstring | null(required)
entityIdstring(uuid)(required)
proposedChangesobject
statusstring(required)
createdAtstring | string(required)
decidedAtstring | string | null(required)
decidedBystring | null(required)

DriftProposalWithEntity

FieldTypeDescription
idstring(uuid)(required)
importSourceIdstring(uuid)(required)
projectIdstring | null(required)
entityIdstring(uuid)(required)
proposedChangesobject
statusstring(required)
createdAtstring | string(required)
decidedAtstring | string | null(required)
decidedBystring | null(required)
entityNamestring | null(required)

Error

FieldTypeDescription
errorstring(required)
codestring

ImportSource

FieldTypeDescription
idstring(uuid)(required)
projectIdstring | null(required)
namestring(required)
labelsobject | null(required)
sourceKindtf-state | atmos-manifests(required)
sourceUristring(required)
reconciliationPolicyauto-update | human-approval(required)
lastScannedAtstring | string | null(required)
lastScanStatusstring | null(required)
lastScanSummaryobject | null
createdAtstring | string(required)
updatedAtstring | string(required)

ImportSourceDrift

FieldTypeDescription
sourceImportSource(required)
totalsobject(required)
entitiesobject[](required)
pendingProposalsDriftProposalWithEntity[](required)

ImportSourceList

Type: ImportSource[]

ImportSourceRescanResult

FieldTypeDescription
scanobject(required)
lastScannedAtstring(required)
lastScanStatusstring(required)

ModuleSourceRule

FieldTypeDescription
unitmodule(required)
addressstring(required)
mergeAcrossSourcestrueDeclares that this rule's identity is deliberately the same across sources, so the same object in two sources is ONE entity. Required when the identity reads no {{ match.* }} capture, because such an identity cannot vary by source.
matchstring(required)
identitystring(required)
partstring
propertiesobject
statestring

ResourceSourceRule

FieldTypeDescription
unitresource(required)
typestring(required)
mergeAcrossSourcestrueDeclares that this rule's identity is deliberately the same across sources, so the same object in two sources is ONE entity. Required when the identity reads no {{ match.* }} capture, because such an identity cannot vary by source.
matchstring(required)
identitystring(required)
partstring
propertiesobject
statestring

StackSourceRule

FieldTypeDescription
unitstack(required)
matchstring(required)
identitystring(required)
partstring
propertiesobject
statestring