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

Lists all available database flags for Cloud SQL instances.

### HTTP request

`GET https://sqladmin.googleapis.com/sql/v1beta4/flags`

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

### Query parameters

| Parameters ||
|---|---|
| `databaseVersion` | `string` Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions. |
| `flagScope` | ``enum (`https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/flags#SqlFlagScope`)`` Optional. Specify the scope of flags to be returned by SqlFlagsListService. Return list of database flags if unspecified. |

### Request body

The request body must be empty.

### Response body

Flags list response.

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

| JSON representation |
|---|
| ``` { "kind": string, "items": [ { object (`https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/flags#Flag`) } ] } ``` |

| Fields ||
|---|---|
| `kind` | `string` This is always `sql#flagsList`. |
| `items[]` | ``object (`https://docs.cloud.google.com/sql/docs/sqlserver/admin-api/rest/v1beta4/flags#Flag`)`` flags.list of flags. |

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