ActionRuns


GET /{o}/{p}/action-runs

List action runs

List action runs in this project with optional filtering and pagination.

Auth: Bearer token required · Permission: data:read

Path parameters

NameTypeDescription
ostring
pstring

Query parameters

NameTypeDescription
actionNamestringFilter by action name
entityIdstring(uuid)Filter by entity ID
statuspending | running | succeeded | failed | cancelled | dispatching | blockedFilter by status
limitintegerMax results (1-2000)
cursorstringKeyset cursor from the previous page

Responses

StatusDescriptionSchema
200OKActionRunPage
401UnauthorizedError
403ForbiddenError

GET /{o}/{p}/action-runs/{id}

Get an action run by id

Auth: Bearer token required · Permission: data:read

Path parameters

NameTypeDescription
ostring
pstring
idstring

Responses

StatusDescriptionSchema
200OKActionRun
401UnauthorizedError
403ForbiddenError
404Not FoundError

DELETE /{o}/{p}/action-runs/{id}

Cancel a pending action run

Auth: Bearer token required · Permission: actions:cancel

Path parameters

NameTypeDescription
ostring
pstring
idstring

Responses

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

POST /{o}/{p}/action-runs/{id}/callback

Complete an action run (external workflow callback)

Called by the external workflow to report success/failure. Takes TWO credentials in two headers: a project token or session carrying at least data:read in Authorization: Bearer, and the per-run HMAC-signed callback token in X-Terrantula-Callback-Token. The HMAC is what actually authorizes completing this specific run; the RBAC permission is a floor on the bearer, not the credential doing the authorizing. The two are separate headers because they are separate credentials — carrying both on Authorization made the pair unsatisfiable and the endpoint unreachable (#390).

Write-verb route on a :read permission because the per-run HMAC callback token (verifyCallbackToken), not this permission, authorizes completing this specific run. data:read is the deliberate floor for the bearer project token — a read-capable token is still required alongside the HMAC, never neither — kept below the write-tier permissions so external workflows need only read access, not the ability to trigger or cancel runs. #260. The two credentials travel in two headers: the bearer in Authorization, the HMAC in X-Terrantula-Callback-Token, because one header cannot carry both and while it tried to, the pair was unsatisfiable (#390).

Auth: Bearer token required · Permission: data:read

Path parameters

NameTypeDescription
ostring
pstring
idstring

Request body (application/json)

Type: object | object

Responses

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

Schemas

ActionRun

FieldTypeDescription
idstring(uuid)(required)
actionNamestring(required)
entityIdstring(uuid) | null(required)
statuspending | running | succeeded | failed | cancelled | dispatching | blocked(required)
parametersobject(required)
recommendationsobject(required)
triggeredBystring(required)
createdAtstring | string(required)
startedAtstring | string | null(required)
completedAtstring | string | null(required)
errorstring | null(required)
outputobject | null(required)
orgIdstring(required)
projectIdstring(required)
operationEntityIdstring | null(required)
metadataobject | null(required)
resolvedTargetsobject(required)

ActionRunListRow

FieldTypeDescription
idstring(uuid)(required)
actionNamestring(required)
entityIdstring(uuid) | null(required)
statuspending | running | succeeded | failed | cancelled | dispatching | blocked(required)
parametersobject(required)
recommendationsobject(required)
triggeredBystring(required)
createdAtstring | string(required)
startedAtstring | string | null(required)
completedAtstring | string | null(required)
errorstring | null(required)
outputobject | null(required)
orgIdstring(required)
projectIdstring(required)
operationEntityIdstring | null(required)
metadataobject | null(required)
resolvedTargetsobject(required)
entityNamestring | null(required)
operationEntityNamestring | null(required)

ActionRunPage

FieldTypeDescription
itemsActionRunListRow[](required)
nextCursorstring | nullCursor for the next page; null on the final page (required)

Error

FieldTypeDescription
errorstring(required)
codestring

PlacementDecision

FieldTypeDescription
groupingKindCell | DeploymentTargetSet(required)
groupstring(required)
policyleast-loaded | round-robin | random(required)
metricstring | null(required)
metricValuenumber | null(required)
candidatesinteger(required)

ResolvedTargetRecord

FieldTypeDescription
namestring(required)
provideraws | gcp | s3-backend | tfc-workspace | generic(required)
placementPlacementDecision