- [HTTP request](https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#body.request_body)
- [Response body](https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#body.ListQueuesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#body.aspect)
- [Try it!](https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#try-it)

Lists queues.

Queues are returned in lexicographical order.

### HTTP request

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

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID` Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `cloudtasks.queues.list` |

### Query parameters

| Parameters ||
|---|---|
| `filter` | `string` `filter` can be used to specify a subset of queues. Any `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues#Queue` field can be used as a filter and several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as described in [Stackdriver's Advanced Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Sample filter "state: PAUSED". Note that using filters might cause fewer queues than the requested pageSize to be returned. |
| `pageSize` | `integer` Requested page size. The maximum page size is 9800. If unspecified, the page size will be the maximum. Fewer queues than requested might be returned, even if more queues exist; use the `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#body.ListQueuesResponse.FIELDS.next_page_token` in the response to determine if more queues exist. |
| `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 `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#body.ListQueuesResponse.FIELDS.next_page_token` returned from the previous call to `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#google.cloud.tasks.v2.CloudTasks.ListQueues` method. It is an error to switch the value of the `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#body.QUERY_PARAMETERS.filter` while iterating through pages. |

### Request body

The request body must be empty.

### Response body

Response message for `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#google.cloud.tasks.v2.CloudTasks.ListQueues`.

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

| JSON representation |
|---|
| ``` { "queues": [ { object (`https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues#Queue`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `queues[]` | ``object (`https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues#Queue`)`` The list of queues. |
| `nextPageToken` | `string` A token to retrieve next page of results. To return the next page of results, call `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#google.cloud.tasks.v2.CloudTasks.ListQueues` with this value as the `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/projects.locations.queues/list#body.QUERY_PARAMETERS.page_token`. If the nextPageToken is empty, there are no more results. The page token is valid for only 2 hours. |

### 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](https://docs.cloud.google.com/docs/authentication#authorization-gcp).