Method: tasks.list

Lists tasks that match the specified filter.

HTTP request

GET https://ces.googleapis.com/tasks

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
tenant

string

Tenant ID, provided as a path parameter.

contextId

string

Filter tasks by context ID to get tasks from a specific conversation or session.

status

enum (TaskState)

Filter tasks by their current status state.

pageToken

string

A page token, received from a previous tasks.list call. ListTasksResponse.next_page_token. Provide this to retrieve the subsequent page.

statusTimestampAfter

string (Timestamp format)

Filter tasks which have a status updated after the provided timestamp in ISO 8601 format (e.g., "2023-10-27T10:00:00Z"). Only tasks with a status timestamp time greater than or equal to this value will be returned.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

pageSize

integer

The maximum number of tasks to return. The service may return fewer than this value. If unspecified, at most 50 tasks will be returned. The minimum value is 1. The maximum value is 100.

historyLength

integer

The maximum number of messages to include in each task's history.

includeArtifacts

boolean

Whether to include artifacts in the returned tasks. Defaults to false to reduce payload size.

Request body

The request body must be empty.

Response body

Result object for tasks.list method containing an array of tasks and pagination information.

If successful, the response body contains data with the following structure:

JSON representation
{
  "tasks": [
    {
      object (Task)
    }
  ],
  "nextPageToken": string,
  "pageSize": integer,
  "totalSize": integer
}
Fields
tasks[]

object (Task)

Required. Array of tasks matching the specified criteria.

nextPageToken

string

Required. A token to retrieve the next page of results, or empty if there are no more results in the list.

pageSize

integer

Required. The page size used for this response.

totalSize

integer

Required. Total number of tasks available (before pagination).

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.