Cancel a Task
Cancel a Task.
The same handler is also mounted at /v2/org/{org}/nico/rack/task/{id}/cancel for backward compatibility; prefer this path for new clients.
Cancellation is best-effort and idempotent: tasks in non-terminal states (Pending, Running) are marked Terminated and any underlying Temporal workflow is terminated. Cancelling an already-Terminated task returns the same task without changes. Tasks that have already finished (Succeeded or Failed) cannot be cancelled.
Tasks are site-scoped; siteId must be the Site where the task was created. Org must have an Infrastructure Provider entity. User must have authorization role with PROVIDER_ADMIN suffix.
Request body
Response
Accepted. The cancellation request was accepted and the Task's last known state is returned. Clients should GET the task to observe the final state, since cancellation is best-effort and the operation may still be terminating.
Example response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "Running",
"description": "Power on rack components",
"message": "Processing 3 of 5 components",
"ruleId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"report": {
"version": 1,
"stages": [
{
"number": 1,
"status": "completed",
"startedAt": "2026-06-08T18:00:00Z",
"finishedAt": "2026-06-08T18:00:42Z",
"steps": [
{
"componentType": "Compute",
"status": "completed",
"totalComponents": 4,
"startedAt": "2026-06-08T18:00:00Z",
"finishedAt": "2026-06-08T18:00:42Z"
}
]
},
{
"number": 2,
"status": "running",
"startedAt": "2026-06-08T18:00:42Z",
"steps": [
{
"componentType": "NVLSwitch",
"status": "running",
"totalComponents": 2,
"startedAt": "2026-06-08T18:00:42Z"
},
{
"componentType": "PowerShelf",
"status": "skipped",
"totalComponents": 0
}
]
}
]
}
}Changes
Changed in 7 of the 90 revisions of this API.16
- ○
removed the
Waitingenum value from thestatusresponse property for the response status202response-property-enum-value-removed
- ○
- ○
added the non-success response with the status
504response-non-success-status-added
- ○
- ○
added the optional property
ruleIdto the response with the202statusresponse-optional-property-added
- ○
- ○
added the optional property
reportto the response with the202statusresponse-optional-property-added
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
endpoint added
endpoint-added
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
This revision also has 14 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
endpoint added
endpoint-added
- ○