# Method: projects.locations.instances.list

- [HTTP request](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.instances/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.instances/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.instances/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.instances/list#body.request_body)
- [Response body](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.instances/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.instances/list#body.ListInstancesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.instances/list#body.aspect)

Lists Instances. Results are sorted by creation time, descending.

### HTTP request

`GET https://run.googleapis.com/v2/{parent}/instances`

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The location and project to list resources on. It takes the form `projects/{project}/locations/{location}`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `run.instances.list` |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. Maximum number of Instances to return in this call. |
| `pageToken` | `string` Optional. A page token received from a previous call to instances.list. All other parameters must match. |
| `showDeleted` | `boolean` Optional. If true, returns deleted (but unexpired) resources along with active ones. |

### Request body

The request body must be empty.

### Response body

Response message containing a list of Instances.

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

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

| Fields ||
|---|---|
| `instances[]` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.instances#Instance`)`` The resulting list of Instances. |
| `nextPageToken` | `string` A token indicating there are more items than pageSize. Use it in the next instances.list request to continue. |

### 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).