Method: tasks.cancel

Cancels a task in progress.

HTTP request

POST https://ces.googleapis.com/tasks/{id}:cancel

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
id

string

Required. The resource ID of the task to cancel.

Request body

The request body contains data with the following structure:

JSON representation
{
  "tenant": string,
  "metadata": {
    object
  }
}
Fields
tenant

string

Optional. Opaque routing identifier. Must match the tenant value from the selected AgentInterface in the Agent Card when that field is set.

metadata

object (Struct format)

A flexible key-value map for passing additional context or parameters.

Response body

If successful, the response body contains an instance of Task.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/ces

For more information, see the Authentication Overview.