Apply


POST /{o}/{p}/apply

Apply declarations (terraform-style)

Apply schema + data declarations against the project. Supports dry-run (plan-only) and force (allow breaking changes). Returns 207 when some items fail.

Auth: Bearer token required ยท Permission: apply:write

Path parameters

NameTypeDescription
ostring
pstring

Query parameters

NameTypeDescription
sourcestringFilter to one registered import source

Request body (application/json)

FieldTypeDescription
itemsobject | object | object | object | object | object | object | object | object[]Schema + data declarations (use --file for multi-doc YAML or directories) (required)
forcebooleanAllow breaking schema changes
deletionsobject[]Schema-level kinds to delete after the apply
dryRunbooleanPlan-only โ€” no writes
prunebooleanDelete synced entities under source that the items do not name (plus their relationships)
syncSourcestring
observedAtstring(date-time)
expectedRevisionintegerApply only if this is the current catalog revision; omit for last-writer-wins

Responses

StatusDescriptionSchema
200OKApplyResult
207Status 207ApplyResult
401UnauthorizedError
403ForbiddenError
409ConflictApplyConflict
422Unprocessable EntityApplyInvalid

Schemas

ApplyConflict

FieldTypeDescription
errorstring(required)
codestring
expectedRevisionintegerPresent on a CATALOG_REVISION_MISMATCH 409: the precondition the caller sent
currentRevisionintegerPresent on a CATALOG_REVISION_MISMATCH 409: the revision the project is actually at

ApplyInvalid

FieldTypeDescription
errorstring(required)
codestring
violationsobject[]Present on a CATALOG_INVALID 422: every rule that fired, not the first, so fixing a catalog costs one round trip rather than one per mistake.
destructiveHunksobject[]Present on a DESTRUCTIVE_CHANGES_REQUIRE_FORCE 422: what the apply would have destroyed.

ApplyResult

FieldTypeDescription
succeededobject[](required)
failedobject[](required)
skippedobject[](required)
diffobjectPopulated only when the request set dryRun:true. EntityType deletion cascades are NOT expanded โ€” deleted reflects only the requested deletions.
stampedCountinteger(required)
prunedCountinteger
revisionintegerThe project's catalog revision after this apply โ€” newly minted when the catalog changed, the unchanged head when it did not (D8) or when dryRun was set. Read this to learn the next expectedRevision. (required)

CellSelector

FieldTypeDescription
matchCellSelectorTerm[](required)

CellSelectorEqualsTerm

FieldTypeDescription
propertystring(required)
equalsstring(required)

CellSelectorInTerm

FieldTypeDescription
propertystring(required)
instring[](required)

CellSelectorTerm

Error

FieldTypeDescription
errorstring(required)
codestring

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