Lists instances in a given project and location.

### HTTP request

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent of the instance. Formats: - `projects/{projectId}/locations/{location}` to list instances in a specific zone. - `projects/{projectId}/locations/-` to list instances in all locations. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `notebooks.instances.list` |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. Maximum return size of the list call. |
| `pageToken` | `string` Optional. A previous returned page token that can be used to continue listing from the last result. |
| `orderBy` | `string` Optional. Sort results. Supported values are "name", "name desc" or "" (unsorted). |
| `filter` | `string` Optional. List filter. |

### Request body

The request body must be empty.

### Response body

Response for listing notebook instances.

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

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

| Fields ||
|---|---|
| `instances[]` | ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/notebooks/workbench/reference/rest/v2/projects.locations.instances#Instance`)`` A list of returned instances. |
| `nextPageToken` | `string` Page token that can be used to continue listing from the last result in the next list call. |
| `unreachable[]` | `string` Unordered list. Locations that could not be reached. For example, \['projects/{projectId}/locations/us-west1-a', 'projects/{projectId}/locations/us-central1-b'\]. A ListInstancesResponse will only contain either instances or unreachables, |

### Authorization scopes

Requires one of the following OAuth scopes:

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

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