# listAlerts

`GET /apis/cra.diagrid.io/v1beta1/alerts`

List the notification alerts recorded for the organization, newest-first.

## Request

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | No | Maximum number of alerts to return, newest first. Default: `100`. |

## Responses

### 200 — [OK](https://jsonapi.org/format/#fetching-resources-responses-200)

`application/json`

The organization's recorded notification alerts, ordered newest-first.

- `alerts` (object[]) — The alerts, ordered newest-first and truncated to the requested limit.
  - `id` (string) — The alert's unique id, assigned by the component that raised it.
  - `projectId` (string) — The UID of the project the alert was raised in, not the name projects are addressed by elsewhere in this API. An alert is routed to the region its project runs in by UID, and the UID survives a rename.
  - `type` (string) — Classifies what the alert reports.
  - `labels` (object<string, string>) — The alert's structured detail, for example the app id it concerns. Notification routes select on these.
  - `message` (string) — The human-readable alert text.
  - `timestamp` (string (date-time)) — RFC3339 timestamp of when the alert was accepted, assigned by the server rather than by the component that raised it.
- `total` (integer) — How many alerts the organization has recorded, before the limit is applied. A total greater than the number of alerts returned means the response was truncated.

### default — Unexpected error.

`application/json`

In the case of an error, a standard format error response body will be returned and the HTTP status code will be set to an error status. The response contains an object with a single error object.

- `code` (string) — Required. This is the same as the HTTP status of the response.
- `message` (string) — Required. A short description of the error.
- `status` (object) — Required. A status code that indicates the error type.
- `details` (object) — Additional details about the errors.
  - `@type` (string) — The type of error.
  - `reason` (string) — A reason for the error.
  - `domain` (string) — The domain in which the error occurred.
  - `metadata` (object) — Additional metadata about the error.

`application/vnd.api+json`

JSONAPI.org specification error response wrapper for UI.

- `error` (object) — In the case of an error, a standard format error response body will be returned and the HTTP status code will be set to an error status. The response contains an object with a single error object.
  - `code` (string) — Required. This is the same as the HTTP status of the response.
  - `message` (string) — Required. A short description of the error.
  - `status` (object) — Required. A status code that indicates the error type.
  - `details` (object) — Additional details about the errors.
    - `@type` (string) — The type of error.
    - `reason` (string) — A reason for the error.
    - `domain` (string) — The domain in which the error occurred.
    - `metadata` (object) — Additional metadata about the error.
- `meta` (object<string, object>) — Link members related to the primary data.
  - One of:
    - **string (uri-reference)** — A string containing the link's URL.
    - **object**
      - `href` (string (uri-reference)) — Required. A string containing the link's URL.
      - `meta` (object) — Non-standard meta-information that can not be represented as an attribute or relationship.
- `links` (object) — Non-standard meta-information that can not be represented as an attribute or relationship.
