- [HTTP request](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/instances/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/instances/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/instances/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/instances/list#body.request_body)
- [Response body](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/instances/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/instances/list#body.InstancesListResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/instances/list#body.aspect)
- [Examples](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/instances/list#examples)
- [Try it!](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/instances/list#try-it)

Lists instances under a given project.

### HTTP request

`GET https://sqladmin.googleapis.com/sql/v1beta4/projects/{project}/instances`

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

### Path parameters

| Parameters ||
|---|---|
| `project` | `string` Project ID of the project for which to list Cloud SQL instances. |

### Query parameters

| Parameters ||
|---|---|
| `filter` | `string` A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. |
| `maxResults` | `integer (https://developers.google.com/discovery/v1/type-format format)` The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000. |
| `pageToken` | `string` A previously-returned page token representing part of the larger set of results to view. |

### Request body

The request body must be empty.

### Response body

Database instances list response.

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

| JSON representation |
|---|
| ``` { "kind": string, "warnings": [ { object (`https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/operations#ApiWarning`) } ], "items": [ { object (`https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/instances#DatabaseInstance`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `kind` | `string` This is always `sql#instancesList`. |
| `warnings[]` | ``object (`https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/operations#ApiWarning`)`` instances.list of warnings that occurred while handling the request. |
| `items[]` | ``object (`https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1beta4/instances#DatabaseInstance`)`` instances.list of database instance resources. |
| `nextPageToken` | `string` The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |

### Authorization scopes

Requires one of the following OAuth scopes:

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

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