Cancel a task run
Request cancellation of a task run.
Only a run the caller’s organization owns can be cancelled: any other is 404, the same answer as a run that does not exist, and nothing is touched. A finished SCRIPT or Union run with no earlier cancel request returns 409. Repeating an accepted cancel returns 202, including after the run finishes.
The run reads CANCELLING at once while its workload is active. Active workloads stop asynchronously; accepting cancellation does not prove compute has stopped. A run with no workload is finalized CANCELLED at once and kept from starting. A recorded workload reaches CANCELLED through its backend cancellation/destroy events. Script intent is durable; the KubeApp cleaner retries undelivered destroys. A cancel committed before the script’s pre-deploy gate prevents execution. After that gate cancellation is best effort: code may start briefly, and a previously won terminal result stays won.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The id of the task run.
Response
The cancel was accepted: a run still going reads CANCELLING until the backend confirms it CANCELLED, and a run with nothing started yet reads CANCELLED at once and never starts. Also returned for any repeat of an accepted cancel, including once the run reads CANCELLED; a repeat still pending is dispatched again

