Skip to content

Update Alert Rule

PATCH /alerts/{alert_rule_id}
NameInTypeNotes
alert_rule_idpathstring (uuid)required—
FieldTypeNotes
namestring | nulloptionalmin length 1 max length 200
metricerror_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 | nulloptional—
comparatorgt | gte | lt | lte | nulloptional—
thresholdnumber | nulloptional—
agent_idstring (uuid) | nulloptional—
window_secondsinteger | nulloptionalmin 60 max 86400
min_samplesinteger | nulloptionalmin 1 max 10000
severityinfo | warning | critical | nulloptional—
cooldown_secondsinteger | nulloptionalmin 60 max 86400
notify_logboolean | nulloptional—
notify_webhook_urlstring | nulloptional—
notify_secretstring | nulloptionalmin length 16 max length 200
is_activeboolean | nulloptional—
StatusDescriptionBody
200Successful ResponseAlertRuleView
422Validation ErrorHTTPValidationError
Terminal window
curl -X PATCH https://your-deployment.example.com/alerts/{alert_rule_id} \
-H "Authorization: Bearer $COBRE_TOKEN"
FieldTypeNotes
idstring (uuid)required—
scopeworkspace | organization | platformrequired—
namestringrequired—
metricerror_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_unreachablerequired—
comparatorgt | gte | lt | lterequired—
thresholdnumberrequired—
agent_idstring (uuid) | nullrequired, nullable—
window_secondsintegerrequired—
min_samplesintegerrequired—
severityinfo | warning | criticalrequired—
cooldown_secondsintegerrequired—
notify_logbooleanrequired—
notify_webhook_urlstring | nullrequired, nullable—
is_activebooleanrequired—
last_evaluated_atstring (date-time) | nullrequired, nullable—
last_valuenumber | nullrequired, nullable—
created_atstring (date-time)required—
updated_atstring (date-time)required—