Update an alert policy
PATCH/api/v1/orgs/{orgId}/alert-policies/{alertPolicyId}
Partially update an existing alert policy. All fields are optional; only the fields provided are changed. Enable/disable status and data-stream bindings are managed by separate endpoints, not by this one.
Parameters
alertPolicyId(UUID, required): Alert policy identifier.
Request Body
At least one field must be provided. An entirely empty body, or a body whose only field is notification: null, returns 400.
policyName(string, optional): New policy name.description(string, optional): New description.alertLevel(string, optional): New trigger threshold expression. Ex:>=70.alertResetLevel(string, optional): New reset threshold expression. Ex:<65.
Both expressions use the same format. Write one comparison operator (>=, <=, ==, !=, >, <) followed by a number. Spaces are allowed, and the number can be negative or a decimal (Ex: >= -5.5). Not supported: a leading + (+5), exponent notation (1e3), a number without a leading digit (.5), strings, booleans, and combined conditions such as AND/OR. The format is not validated. A malformed condition is not rejected and may stop the policy from triggering. Check the format before you send it.
delay(integer, optional): New wait time in seconds. Same behavior as on create. Must not be negative.notification(object, optional): Replaces the entire notification configuration (same shape as create:channelIds,recipients, and eithertemplateId+variablesorsubject+content). Providing this field replaces the whole object, it is not merged field-by-field with the existing configuration. Omittingnotification, or sending it asnull, keeps the current settings. To change recipients, send the complete new notification object with the full recipient list you want.
Responses
200 OK: Alert policy updated successfully. If the policy is currently enabled, the updated definition is republished immediately for evaluation.400 Bad Request: Empty request body, validation error, ornotificationprovided with bothtemplateIdandsubject/content.404 Not Found: Alert policy not found, or anotification.channelIds/templateIdentry does not exist in this org.
Request
Responses
- 200
OK