v57

latestOpenAPI 3.1.0Apache-2.0raw.githubusercontent.com2026-08-012143051018.3 KB
Task Run

Advance a Task Run to its next phase

Open the next phase of a Task Run that is paused at a phase gate. Optionally guard the transition with expectedPhaseIndex: when set, the phase that would be opened must match, otherwise Flow rejects the advance so a stale client cannot open the wrong phase.

Task Runs are site-scoped; siteId must be the Site that owns the Task Run. Org must have an Infrastructure Provider entity. User must have authorization role with PROVIDER_ADMIN suffix.

post/v2/org/{org}/nico/task/run/{id}/advance

Request body

siteIdstring uuid required

ID of the Site that owns the Task Run.

expectedPhaseIndexinteger

Optional guard: when set, the phase that would be opened must match this zero-based index, otherwise the advance is rejected.

Response

Accepted. The advance request was accepted and the Task Run's last known state is returned.

idstring uuid required

Unique identifier of the Task Run.

namestring required

Human-readable name of the Task Run.

descriptionstring

Optional free-form description.

operationType'PowerControl' | 'FirmwareControl' required

Type of operation this Task Run executes. Currently always FirmwareControl.

operationCodestring

Operation code within the operation type (e.g. upgrade).

status'Unknown' | 'Pending' | 'Running' | 'Paused' | 'Completed' | 'Cancelled' | 'Failed' | 'CompletedWithFailures' required

Current lifecycle state of the Task Run.

statusReason'Unknown' | 'None' | 'OperatorPaused' | 'PhaseGate' | 'SafetyGate' | 'ConflictRetryTimeout' required

Why the Task Run is paused or terminal (e.g. PhaseGate, SafetyGate). None when there is no qualifying reason.

statusMessagestring

Optional human-readable detail for the current status.

totalPhasesinteger required

Total number of phases the selected targets were divided into.

createdstring date-time required

Timestamp when the Task Run was created.

updatedstring date-time required

Timestamp when the Task Run was last updated.

startedstring date-time nullable

Timestamp when the Task Run started execution. Null before it starts.

finishedstring date-time nullable

Timestamp when the Task Run reached a terminal state. Null while active.