跳至主要内容

Update 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 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.
  • delay (integer, optional): New debounce delay in seconds. Must be non-negative.
  • notification (object, optional): Replaces the entire notification configuration (same shape as create — channelIds, recipients, and either templateId+variables or subject+content). Providing this field replaces the whole object, it is not merged field-by-field with the existing configuration.

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, or notification provided with both templateId and subject/content.
  • 404 Not Found: Alert policy not found, or a notification.channelIds/templateId entry does not exist in this org.

Request

Responses

OK