Method: projects.locations.queues.tasks.list

Lists the tasks in a queue.

By default, only the BASIC view is retrieved due to performance considerations; responseView controls the subset of information which is returned.

The tasks may be returned in any order. The ordering may change at any time.

HTTP request

GET https://cloudtasks.googleapis.com/v2/{parent=projects/*/locations/*/queues/*}/tasks

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID

Authorization requires the following IAM permission on the specified resource parent:

  • cloudtasks.tasks.list

Query parameters

Parameters
responseView

enum (View)

The responseView specifies which subset of the Task will be returned.

By default responseView is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains.

Authorization for FULL requires cloudtasks.tasks.fullView Google IAM permission on the Task resource.

pageSize

integer

Maximum page size.

Fewer tasks than requested might be returned, even if more tasks exist; use nextPageToken in the response to determine if more tasks exist.

The maximum page size is 1000. If unspecified, the page size will be the maximum.

pageToken

string

A token identifying the page of results to return.

To request the first page results, pageToken must be empty. To request the next page of results, pageToken must be the value of nextPageToken returned from the previous call to tasks.list method.

The page token is valid for only 2 hours.

Request body

The request body must be empty.

Response body

Response message for listing tasks using tasks.list.

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

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

object (Task)

The list of tasks.

nextPageToken

string

A token to retrieve next page of results.

To return the next page of results, call tasks.list with this value as the pageToken.

If the nextPageToken is empty, there are no more results.

Authorization scopes

Requires one of the following OAuth scopes:

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

For more information, see the Authentication Overview.