v57

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

Cancel a Task Run

Cancel a Task Run. Best-effort cancellation cascades to the current phase's in-flight target Tasks; targets not yet claimed are not started. Cancelling an already-terminal Task Run returns its last known state.

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}/cancel

Request body

siteIdstring uuid required

ID of the Site that owns the Task Run.

reasonstring

Optional free-form reason recorded with the cancellation.

Response

Accepted. The cancellation 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.