Cancel a Task.
Cancellation is best-effort and idempotent: tasks in non-terminal
states (`Pending`, `Running`, `Waiting`) 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 `FORGE_PROVIDER_ADMIN` authorization role.
Request
This endpoint expects an object.
siteIdstringRequiredformat: "uuid"
ID of the Site that owns the task (tasks are site-scoped).
Response
Accepted. The cancellation request was accepted and the task as
last reported by Flow is returned. Clients should GET the task
to observe the final state, since cancellation is best-effort
and the underlying workflow may still be terminating.
idstringformat: "uuid"
Unique identifier of the task.
statusenum
Current state of the task.
descriptionstring
Human-readable description provided when the task was created.
messagestring
Optional status or error message describing the current state or result.
starteddatetime
Timestamp when the task started execution.
finisheddatetime
Timestamp when the task finished (succeeded, failed or terminated).
createddatetime
Timestamp when the task was created.
updateddatetime
Timestamp when the task was last updated.