## Alerts (`alerts`)

Recent alert and recovery events, kept for 30 days.

Authentication: Admin only · Docs: https://www-demo.kuxitong.com/en/docs/api/alerts

### GET `/api/v2/alerts`

List recent alerts and recoveries · Authentication: Admin only

Query parameters:

| Field | Type | Required | Description |
|---|---|---|---|
| `page` | integer |  | Page number, starting from 1 Default: 1 |
| `page_size` | integer |  | Items per page Default: 20 |
| `rule` | string |  | Filter by rule name. |
| `kind` | AlertKind |  | Filter by kind: fire for alerts, resolve for recoveries. Values: ["fire","resolve"] |

```sh
curl "https://panel.example.com/api/v2/alerts" \
  -H "X-API-Key: $GOCDN_API_KEY"
```

Alerts object:

| Field | Type | Required | Description |
|---|---|---|---|
| `created_at` | string |  | Created at |
| `detail` | string |  | Additional details. |
| `id` | integer |  | Record ID |
| `kind` | AlertKind |  | fire: alert fired; resolve: recovered. Values: ["fire","resolve"] |
| `msg_id` | integer |  | Notification sent (in-app message ID). |
| `rule` | string |  | Alert rule key. |
| `subject` | string |  | Subject the alert is about, such as a node or site. |
| `threshold` | number |  | Threshold of the rule. |
| `title` | string |  | Chinese name of the rule (same as rule when the rule no longer exists). |
| `unit` | string |  | Unit of the value and threshold. |
| `value` | number |  | Value that triggered the alert. |
