Cancel task
Cancels a task by marking it for cancellation in the system.
This method initiates task cancellation based on the task’s current state:
- If the task has not been sent to an agent, it cancels immediately and transitions the task
to a terminal state (
STATUS_DONE_NOT_OKwithERROR_CODE_CANCELLED). - If the task has already been sent to an agent, the cancellation request is routed to the agent.
The agent is then responsible for deciding whether cancellation is possible or not:
- If the task can be cancelled, the agent must use
UpdateTaskStatusand set the task status toSTATUS_DONE_NOT_OK. - If the task cannot be cancelled, the agent must use
UpdateTaskStatusto attach aTaskErrorto the task with the error codeERROR_CODE_REJECTEDand amessageexplaining why the task cannot be cancelled.
- If the task can be cancelled, the agent must use
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Request
Response
DEPRECATED: Human readable display name for this task, should be short (<100 chars).
Any related Tasks associated with this, typically includes an assignee for this task and/or a parent.
If populated, indicates an initial set of entities that can be used to execute an entity aware task For example, an entity Objective, an entity Keep In Zone, etc. These will not be updated during execution. If a taskable agent needs continuous updates on the entities from the COP, can call entity-manager, or use an AlternateId escape hatch.
Any execution-related scheduling constraints for the agent after task delivery.