# Method: projects.alerts.list

- [HTTP request](https://docs.cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alerts/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alerts/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alerts/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alerts/list#body.request_body)
- [Response body](https://docs.cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alerts/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alerts/list#body.ListAlertsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alerts/list#body.aspect)
- [Try it!](https://docs.cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alerts/list#try-it)

Lists the existing alerts for the metrics scope of the project.

### HTTP request

`GET https://monitoring.googleapis.com/v3/{parent}/alerts`

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The name of the project to list alerts for. |

### Query parameters

| Parameters ||
|---|---|
| `filter` | `string` Optional. An alert is returned if there is a match on any fields belonging to the alert or its subfields. |
| `orderBy` | `string` Optional. A comma-separated list of fields in `Alert` to use for sorting. The default sort direction is ascending. To specify descending order for a field, add a `desc` modifier. The following fields are supported: - `openTime` - `closeTime` For example, `closeTime desc, openTime` will return the alerts closed most recently, with ties broken in the order of older alerts listed first. If the field is not set, the results are sorted by `openTime desc`. |
| `pageSize` | `integer` Optional. The maximum number of results to return in a single response. If not set to a positive number, at most 50 alerts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| `pageToken` | `string` Optional. If non-empty, `pageToken` must contain a value returned as the `nextPageToken` in a previous response to request the next set of results. |

### Request body

The request body must be empty.

### Response body

The `alerts.list` response.

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

| JSON representation |
|---|
| ``` { "alerts": [ { object (`https://docs.cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alerts#Alert`) } ], "nextPageToken": string, "totalSize": integer } ``` |

| Fields ||
|---|---|
| `alerts[]` | ``object (`https://docs.cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alerts#Alert`)`` The list of alerts. |
| `nextPageToken` | `string` If not empty, indicates that there may be more results that match the request. Use the value in the `pageToken` field in a subsequent request to fetch the next set of results. The token is encrypted and only guaranteed to return correct results for 72 hours after it is created. If empty, all results have been returned. |
| `totalSize` | `integer` The estimated total number of matching results for this query. |

### Authorization scopes

Requires one of the following OAuth scopes:

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

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