alerting-v2

Spaces method and path for this operation:

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/alerting/v2/rules</span></div>

Refer to Spaces for more information.

Creates a rule with a server-generated identifier. To create or replace a rule with a client-supplied identifier, use PUT /api/alerting/v2/rules/{id}/.<br/><br/>[Required authorization] Route required privileges: manage_alerting-v2-rules.

post/api/alerting/v2/rules

Request

  • Base URL
    https://localhost:5601
  • URL
    https://localhost:5601/api/alerting/v2/rules
  • Auth
    • API key in header Authorization
    • or HTTP basic

Headers

kbn-xsrfstring required
Example:true

A required header to protect against CSRF attacks

Request body

time_fieldstring

Document field Kibana uses with schedule.lookback to time-filter query.base.

Response

Returns the newly created rule.

created_atstring date-time required

ISO timestamp when the rule was created.

enabledboolean required

Whether the rule is enabled.

idstring required

Unique rule identifier.

time_fieldstring

Document field Kibana uses with schedule.lookback to time-filter query.base.

updated_atstring date-time required

ISO timestamp when the rule was last updated.

versioninteger required

Monotonically increasing integer number representing a rule configuration version, incremented on every change. Used on generated rule events as rule.version.

Changes

    • warning

      the / request property's maxLength was set to 32

    • warning

      the / request property's maxLength was set to 32

    • warning

      the / request property's maxLength was set to 32

    • warning

      the / request property's maxLength was set to 32

    • breaking

      removed subschema #1 subschema #2 from the request property anyOf list

    • breaking

      removed subschema #1 subschema #2 subschema #3 from the request property anyOf list

    • breaking

      removed subschema #1 subschema #2 subschema #3 subschema #4 from the request property anyOf list

    • info

      added subschema #1 subschema #2 to the request property anyOf list

    • info

      added subschema #1 subschema #2 subschema #3 to the request property anyOf list

    • info

      added subschema #1 subschema #2 subschema #3 subschema #4 to the request property anyOf list

    • info

      added subschema #1 subschema #2 to the response property anyOf list for the response status

    • info

      added subschema #1 subschema #2 subschema #3 to the response property anyOf list for the response status

    • info

      added subschema #1 subschema #2 subschema #3 subschema #4 to the response property anyOf list for the response status

    • info

      removed subschema #1 subschema #2 from the response property anyOf list for the response status

    • info

      removed subschema #1 subschema #2 subschema #3 from the response property anyOf list for the response status

    • info

      removed subschema #1 subschema #2 subschema #3 subschema #4 from the response property anyOf list for the response status