GET /api/v1/alerts
List all alert rules for the tenant.Response
POST /api/v1/alerts
Create a new alert rule. Editor or Admin.Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Alert rule name |
metric | string | Yes | Metric to monitor (e.g., error_rate, latency_p99, decision_count) |
operator | string | Yes | Comparison operator: gt, lt, gte, lte, eq |
threshold | number | Yes | Threshold value to compare against |
windowMinutes | number | No | Time window in minutes (default: 5) |
channels | array | Yes | Notification channels |
channels[].type | string | Yes | Channel type: webhook or email |
channels[].target | string | Yes | Webhook URL or email address |
cooldownMinutes | number | No | Cooldown between re-alerts (default: 60) |
enabled | boolean | No | Whether the rule is active (default: true) |
Example
Response (201)
Returns the created alert rule object.GET /api/v1/alerts/
Get a single alert rule by ID.PUT /api/v1/alerts/
Update an existing alert rule. All fields are optional — only provided fields are updated. Editor or Admin.Request Body
Same fields as POST, all optional.DELETE /api/v1/alerts/
Delete an alert rule. Editor or Admin.Response
204 No Content on success.