Create an action policy

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

Creates an action policy with a server-generated identifier. To create or replace an action policy with a client-supplied identifier, use PUT /api/alerting/v2/action_policies/{id}/.

Required privileges

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.

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

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

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 required

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
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 required

The name of the action policy.

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

Responses

Returns the newly created 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}