Partially update an action policy.

Base URL
https://{kibana_url}
  • PATCH /api/alerting/v2/action_policies/{id}
  • PATCH /s/{space_id}/api/alerting/v2/action_policies/{id}
Auth

Apply a partial update. A field you omit keeps its stored value, and that applies at every level: send {"matcher": {"tags": ["prod"]}} to change one leaf while leaving its siblings alone. Send null to clear a field, again at any level: {"matcher": {"expression": null}} clears a single leaf, while {"matcher": null} clears a whole object. Lists and variant objects are replaced as a unit rather than merged, since a partly-sent variant could never be valid. The merged result is validated as a whole, so a patch that would leave the resource invalid is rejected with a 400 and nothing is stored.

Required privileges

manage_alerting-v2-action-policies and read_alerting-v2-rules

Path parameters

space_id string optional

An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.

id string · min length: 1 · max length: 150 · pattern: ^[a-zA-Z0-9_-]+$ required

The ID of the action policy. Copy it from the response when you create a policy, fetch one policy, or fetch the policy list. You can't change it after creation. Avoid reusing a deleted policy's ID: the new policy inherits its execution history and throttling state. IDs appear in URLs and logs, so don't include sensitive data.

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

description string · min length: 1 · max length: 1024 nullable

A description of the action policy. Absent when the policy has none; send null on PATCH to clear it.

destinations union oneOf[] · min items: 1 · max items: 10

The list of destinations. At least one is required. Each one can appear at most once.

One of:
{} type: workflow
id string · min length: 1 · max length: 150 required

The workflow identifier.

type enum required

The destination type.

Values: workflow
grouping union oneOf

How matched alerts are batched into notifications. Absent falls back to per_alert; send null on PATCH to clear it. The mode decides the rest of the block, so a PATCH replaces it whole: send the complete mode variant rather than a single field.

One of: (determined by mode)
mode: per_alert

one notification per alert lifecycle (default).

mode enum required
Values: per_alert
name string · min length: 1 · max length: 256

The name of the action policy.

throttle union oneOf

The throttle configuration for notifications. Absent when notifications are not throttled; send null on PATCH to clear it. The strategy decides the rest of the block, so a PATCH replaces it whole: send the complete strategy variant rather than a single field.

One of: (determined by strategy)
strategy: on_status_change

notify only on alert status transitions (default for per_alert).

strategy enum required
Values: on_status_change

Responses

Returns the updated action policy.

application/json
created_at string · format: date-time · max length: 64 required

The ISO datetime when the action policy was created.

created_by object required

The actor who created the action policy.

profile_uid string required nullable

User profile ID of the actor, or null when it cannot be resolved.

description string

A description of the action policy. Omitted when the policy has none.

destinations union oneOf[] required

The list of destinations.

One of:
{} type: workflow
id string · min length: 1 · max length: 150 required

The workflow identifier.

type enum required

The destination type.

Values: workflow
enabled boolean required

Whether the action policy is enabled.

grouping union oneOf
One of: (determined by mode)
mode: per_alert

one notification per alert lifecycle (default).

mode enum required
Values: per_alert
id string required

The unique identifier for the action policy.

name string required

The name of the action policy.

snoozed_until string

The ISO datetime until which the policy is snoozed. Omitted when the policy is not snoozed.

throttle union oneOf
One of: (determined by strategy)
strategy: on_status_change

notify only on alert status transitions (default for per_alert).

strategy enum required
Values: on_status_change
updated_at string · format: date-time · max length: 64 required

The ISO datetime when the action policy was last updated.

updated_by object required

The actor who last updated the action policy.

profile_uid string required nullable

User profile ID of the actor, or null when it cannot be resolved.

Base URL
https://{kibana_url}