v1

latestOpenAPI 3.1.02026-08-0421263172.4 KB
tasks

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_OK with ERROR_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 UpdateTaskStatus and set the task status to STATUS_DONE_NOT_OK.
    • If the task cannot be cancelled, the agent must use UpdateTaskStatus to attach a TaskError to the task with the error code ERROR_CODE_REJECTED and a message explaining why the task cannot be cancelled.
put/api/v1/tasks/{taskId}/cancel

Path parameters

taskIdstring required

The ID of task to cancel

Headers

Authorizationstring required

Bearer authentication

Request body

Response

Task cancellation was successful.

displayNamestring

DEPRECATED: Human readable display name for this task, should be short (<100 chars).

lastUpdateTimestring date-time

Records the time of last update.

scheduledTimestring date-time

If the task has been scheduled to execute, what time it should execute at.

descriptionstring

Longer, free form human readable description of this task

isExecutedElsewhereboolean

If set, execution of this task is managed elsewhere, not by Task Manager. In other words, task manager will not attempt to update the assigned agent with execution instructions.

createTimestring date-time

Time of task creation.