Snooze an alert Generally available; added in 9.5.0

POST /api/alerting/rule/{rule_id}/alert/{alert_id}/_snooze

Spaces method and path for this operation:

post /s/{space_id}/api/alerting/rule/{rule_id}/alert/{alert_id}/_snooze

Refer to Spaces for more information.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • rule_id string Required

    The identifier for the rule.

    Maximum length is 256.

  • alert_id string Required

    The identifier for the alert.

    Maximum length is 1000.

Query parameters

  • validate_alerts_existence boolean

    Set to true to validate that the specified alert exists. If a 400 error is returned, the specified alert does not exist. Defaults to true.

application/json

Body

  • condition_operator string

    Logical operator applied to the conditions array. "any" expires the snooze when at least one condition is met; "all" requires every condition to be met. When conditions are provided but this field is omitted, defaults to "any".

    Values are any or all.

  • conditions array[object]

    One or more conditions that, when met, automatically expire the snooze. Supported types: field_change, severity_change, severity_equals.

    Not more than 10 elements.

    Any of:
  • expires_at string

    The datetime at which the snooze expires, in ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ). When omitted, the snooze persists indefinitely unless manually removed or a defined condition is met.

    Maximum length is 30.

Responses

  • 204

    Indicates a successful call.

  • 400

    Indicates an invalid schema or parameters.

  • 403

    Indicates that this call is forbidden.

  • 404

    Indicates the specified rule or alert doesn't exist.

POST /api/alerting/rule/{rule_id}/alert/{alert_id}/_snooze
curl \
 --request POST 'https://localhost:5601/api/alerting/rule/{rule_id}/alert/{alert_id}/_snooze' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"condition_operator":"any","conditions":[{"field":"string","type":"field_change"}],"expires_at":"string"}'