Docs
Live demo
GET/api/v2/apply-runs
access:readAPI token

Retrieve a paginated list of apply runs for the caller's organization. All filter parameters are optional and additive (AND-ed server-side). created_from and created_to accept RFC3339 timestamps.

  • Results return oldest first.
  • Combine latest_per_rule=true and needs_attention=true to list rules whose last finished apply failed or partly failed without rollback (matching the Dashboard).

Parameters

Query13 optional
cursorstringquery

Pagination cursor for next page

limitintegerquery

Maximum number of items to return (default: 20, max: 100)

plan_idstring · uuidquery

Filter by plan ID (UUID)

policy_idstring · uuidquery

Filter by policy ID (UUID)

target_idstring · uuidquery

Filter by target ID (UUID)

job_idstring · uuidquery

Filter by job ID (UUID)

statusstringquery

Filter by apply run status

pendingrunningsucceededfailedpartially_succeededrollback_in_progressrolled_backfailed_needs_repair
execution_modestringquery

Filter by execution mode

freshexact_saved_plansaved_with_drift_reconcile
created_fromstring · date-timequery

Lower bound on created_at (inclusive, RFC3339)

created_tostring · date-timequery

Upper bound on created_at (inclusive, RFC3339)

existing_rules_onlybooleanquery

Only runs whose rule still exists. Runs of deleted rules are left out

latest_per_rulebooleanquery

Only the newest run of each rule. Older runs of a rule and runs without a rule are left out

needs_attentionbooleanquery

Only finished runs that failed or partly failed and were not rolled back

Responses

200

OK

ListApplyRunsResponse · 4 fields
has_morebooleanrequired

True when another page follows. The list ends when it is false.

itemsarray of ApplyRunResponserequired
18 fields

Safe operation failure. Explanation and recommended_action come from the static failure-code registry. The only text not written by Principal is cluster_answer.

8 fields
codestring (JobFailureCode)required

Closed registry of asynchronous operation failure causes, independent of HTTP problem codes.

ACCESS_PROFILE_STALEAMBIGUOUS_TARGET_OUTCOMEAPPLY_INTERRUPTEDAUTHENTICATION_FAILEDCLICKHOUSE_REPLICAS_OUT_OF_SYNCCLICKHOUSE_USER_NAME_RESERVEDCONNECTION_FAILEDCONNECTION_REFUSEDCONNECTION_TIMEOUTCONNECTOR_CREDENTIALS_MISSINGCONNECTOR_PAUSEDCONNECTOR_SOURCE_CHANGEDCONNECTOR_TYPE_UNAVAILABLECONSTRAINT_VIOLATIONCREDENTIAL_EXPIREDCREDENTIAL_NOT_FOUNDDATABASE_NOT_FOUNDDRIFT_BINDING_NOT_FOUNDDRIFT_DEFAULT_INHERITED_SKIPPEDDRIFT_NO_EXECUTABLE_DIFFDRIFT_PARTIAL_APPLYDRIFT_PLAN_GENERATION_FAILEDDRIFT_RESOURCE_MISMATCHDRIFT_RULE_DELETINGDRIFT_RUN_OUTDATEDDRIFT_SCOPE_MISMATCHGROUP_EXPANSION_LIMIT_EXCEEDEDHANDLER_NOT_FOUNDK8S_CHANGE_REJECTEDK8S_CLUSTER_UNREACHABLEK8S_NAMESPACE_FORBIDDENK8S_NAMESPACE_NOT_FOUNDK8S_RBAC_FORBIDDENKUBERNETES_MEMBER_CREDENTIALS_PENDINGKUBERNETES_SERVICE_ACCOUNT_KUBECONFIG_NOT_ISSUEDMARIADB_TRUNCATE_UNSUPPORTEDMARIADB_USAGE_UNSUPPORTEDMARIADB_GRANTS_AMBIGUOUSMUTATION_LOCKEDMYSQL_MANAGEMENT_PRIVILEGES_MISSING
34 more values
NOT_FOUNDOPERATION_BACKOFFOPERATION_CANCELLEDOPERATION_TIMEOUTOWNED_OBJECTS_DECISION_REQUIREDPERMISSION_DENIEDPLAN_APPLY_ARTIFACT_INVALIDPLAN_APPLY_ORPHANED_LOCKPLAN_APPLY_ROLLBACK_BASELINE_INVALIDPLAN_APPLY_RULE_CHANGEDPLAN_APPLY_TARGET_STATE_CHANGEDPLAN_APPLY_ACCESS_IMPACT_CHANGEDPOSTGRES_FUTURE_OBJECT_CREATORS_MISSINGPOSTGRES_GRANT_AUTHORITY_MISSINGPOSTGRES_MANAGEMENT_PRIVILEGES_MISSINGPOSTGRES_ROLE_ATTRIBUTE_UNSUPPORTEDPOSTGRES_ROLE_NAME_RESERVEDPOSTGRES_TLS_FILE_NOT_ALLOWEDPROVIDER_REQUEST_FAILEDRATE_LIMITEDROLE_EXISTSROLE_NOT_FOUNDROTATION_CHECK_REQUIREDSECRET_STORE_UNAVAILABLESERIALIZATION_ERRORTARGET_ACCOUNT_IDENTITY_MISMATCHTARGET_ACCOUNT_IDENTITY_UNVERIFIEDTARGET_ACCOUNT_IMPORT_PENDINGTARGET_ACCOUNT_PRINCIPAL_LOGINTARGET_ACCOUNT_TAKENTARGET_CONNECTION_MISSINGTARGET_REPAIR_REQUIREDUNKNOWN_ERRORVALIDATION_FAILED
titlestring

Short name of the failure from the same registry, for lists and queues where the explanation is too long. Absent on failures saved before the field existed.

max length 32
explanationstringrequired
recommended_actionstringrequired
retryablebooleanrequired

Whether the failed attempt was eligible for an automatic retry under the actual queue policy.

phasestring

Known operation phase at failure, when available.

resolution_codestring

Stable code of the action that can resolve this failure, the same vocabulary as a problem's resolution.code, for example upstream.check_connection. Absent when no single action does. A screen that offers the action shows it next to the failure, otherwise it shows recommended_action.

max length 128 · pattern ^[a-z][a-z0-9_-]*(\.[a-z0-9_-]+)*$
cluster_answerstring

The Kubernetes cluster's own answer to a change its admission policy or webhook refused: the policy or webhook name and its message. Only a step failure with code K8S_CHANGE_REJECTED carries it, as plain text without control characters, cut to 500 characters. The cluster administrator writes it, not Principal. Given only to callers with access:read in the rule's organization. Absent for runs saved before the field existed.

max length 500
terminalbooleanrequired

Whether this operation has finished.

outcomestring (entity.OperationOutcome)required

Final operation result, or null while the operation is active.

successfailurecancelledpartial
can be null
substatestring (entity.OperationSubstate)required

Qualifies the status and outcome of an operation where they alone would hide what the operator must know. Null when none applies.

rollback_in_progressrolled_backneeds_repairoutcome_unknowninterruptedrequires_approvalholds_lockawaiting_confirmationexpiredtimed_outrescheduled
can be null
created_atstring
execution_modestring
finished_atstring
idstring
job_idstring
plan_idstring
policy_idstring
22 fields

Safe operation failure. Explanation and recommended_action come from the static failure-code registry. The only text not written by Principal is cluster_answer.

The apply ended before its plan did. The changes it made stay on the target. The steps after the stop never started.

dry_runboolean
execution_modestring
group_applyboolean
member_completedinteger
member_failedinteger
member_resultsarray of entity.ApplyRunGroupMemberResult
member_totalinteger
plan_kindstring
repair_requiredboolean
rollback_attemptedboolean
rollback_completedboolean
saved_artifact_idstring
saved_artifact_versioninteger
steps_totalinteger

Steps a single-rule apply runs. Recorded after every step, so a run Principal stopped running still says how far it got.

steps_completedinteger

Steps the apply made so far.

steps_failedinteger

Steps that failed so far.

changes_appliedinteger

Completed steps that changed something on the target, counted like the rows of the result: a step the plan showed as already in place runs but is not a change. For a group apply, the changes of its members added up. Absent on runs recorded before Principal counted it.

job_attemptinteger

The attempt of the apply job that ran this apply, 1 for the first.

saved_artifact_idstring
saved_artifact_versioninteger
started_atstring

Where a background operation is in the shared lifecycle (decision S1). outcome says how a finished operation ended and substate qualifies the state.

queuedrunningfinished
target_idstring
updated_atstring
next_cursorstring

Opaque cursor of the next page, present only when has_more is true. Send it unchanged as the cursor query parameter with the same filters.

totalinteger

Full number of items that match the request, present only when the list counts them. It is never the size of the page.

Common errors: 400 401 403 429 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close