alerting-v2

Spaces method and path for this operation:

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

Refer to Spaces for more information.

Apply a partial update. A field you omit keeps its stored value, and that applies at every level: send {"metadata": {"name": "Disk pressure"}} to change one leaf while leaving its siblings alone. Send null to clear a field, again at any level: {"metadata": {"description": null}} clears a single leaf, while {"grouping": 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.<br/><br/>[Required authorization] Route required privileges: manage_alerting-v2-rules.

patch/api/alerting/v2/rules/{id}

Request

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

Path parameters

idstring required

The identifier for the rule. Chosen at creation and permanent — it cannot be changed afterwards. Re-using the id of a deleted resource is allowed but discouraged: execution history, change history, and alerts recorded under that id are retained and are attributed to the new resource. Ids appear in URLs and logs, so keep them free of sensitive data.

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