Update Alert Rule
PATCH /alerts/{alert_rule_id}Parameters
Section titled “Parameters”| Name | In | Type | Notes | |
|---|---|---|---|---|
alert_rule_id | path | string (uuid) | required | — |
Request body — AlertRulePatch
Section titled “Request body — AlertRulePatch”| Field | Type | Notes | |
|---|---|---|---|
name | string | null | optional | min length 1 max length 200 |
metric | error_rate | success_rate | failure_count | run_count | avg_latency_ms | p95_latency_ms | cost | token_total | queue_depth | suspension_age | queued_without_workers | provider_credit_remaining | providers_unreachable | null | optional | — |
comparator | gt | gte | lt | lte | null | optional | — |
threshold | number | null | optional | — |
agent_id | string (uuid) | null | optional | — |
window_seconds | integer | null | optional | min 60 max 86400 |
min_samples | integer | null | optional | min 1 max 10000 |
severity | info | warning | critical | null | optional | — |
cooldown_seconds | integer | null | optional | min 60 max 86400 |
notify_log | boolean | null | optional | — |
notify_webhook_url | string | null | optional | — |
notify_secret | string | null | optional | min length 16 max length 200 |
is_active | boolean | null | optional | — |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | Successful Response | AlertRuleView |
422 | Validation Error | HTTPValidationError |
Example
Section titled “Example”curl -X PATCH https://your-deployment.example.com/alerts/{alert_rule_id} \ -H "Authorization: Bearer $COBRE_TOKEN"Response — AlertRuleView
Section titled “Response — AlertRuleView”| Field | Type | Notes | |
|---|---|---|---|
id | string (uuid) | required | — |
scope | workspace | organization | platform | required | — |
name | string | required | — |
metric | error_rate | success_rate | failure_count | run_count | avg_latency_ms | p95_latency_ms | cost | token_total | queue_depth | suspension_age | queued_without_workers | provider_credit_remaining | providers_unreachable | required | — |
comparator | gt | gte | lt | lte | required | — |
threshold | number | required | — |
agent_id | string (uuid) | null | required, nullable | — |
window_seconds | integer | required | — |
min_samples | integer | required | — |
severity | info | warning | critical | required | — |
cooldown_seconds | integer | required | — |
notify_log | boolean | required | — |
notify_webhook_url | string | null | required, nullable | — |
is_active | boolean | required | — |
last_evaluated_at | string (date-time) | null | required, nullable | — |
last_value | number | null | required, nullable | — |
created_at | string (date-time) | required | — |
updated_at | string (date-time) | required | — |