# Method: projects.locations.instances.list

- [HTTP request](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances/list#body.request_body)
- [Response body](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances/list#body.ListInstancesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances/list#body.aspect)
- [Examples](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances/list#examples)
- [Try it!](https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances/list#try-it)

Lists all Redis instances owned by a project in either the specified location (region) or all locations.

The location should have the following format:

- `projects/{projectId}/locations/{locationId}`

If `locationId` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.

### HTTP request

`GET https://redis.googleapis.com/v1/{parent=projects/*/locations/*}/instances`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The resource name of the instance location using the form: `projects/{projectId}/locations/{locationId}` where `locationId` refers to a GCP region. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the pageSize value, the response may include a partial list and a caller should only rely on response's `https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances/list#body.ListInstancesResponse.FIELDS.next_page_token` to determine if there are more instances left to be queried. |
| `pageToken` | `string` The `nextPageToken` value returned from a previous `https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances/list#google.cloud.redis.v1.CloudRedis.ListInstances` request, if any. |

### Request body

The request body must be empty.

### Response body

Response for `https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances/list#google.cloud.redis.v1.CloudRedis.ListInstances`.

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

| JSON representation |
|---|
| ``` { "instances": [ { object (`https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance`) } ], "nextPageToken": string, "unreachable": [ string ] } ``` |

| Fields ||
|---|---|
| `instances[]` | ``object (`https://docs.cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance`)`` A list of Redis instances in the project in the specified location, or across all locations. If the `locationId` in the parent field of the request is "-", all regions available to the project are queried, and the results aggregated. If in such an aggregated query a location is unavailable, a placeholder Redis entry is included in the response with the `name` field set to a value of the form `projects/{projectId}/locations/{locationId}/instances/`- and the `status` field set to ERROR and `statusMessage` field set to "location not available for instances.list". |
| `nextPageToken` | `string` Token to retrieve the next page of results, or empty if there are no more results in the list. |
| `unreachable[]` | `string` Locations that could not be reached. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).