kibana/docs/api/alerting/disable_rule.asciidoc
2023-10-17 07:49:23 -07:00

53 lines
1.4 KiB
Text

[[disable-rule-api]]
== Disable rule API
++++
<titleabbrev>Disable rule</titleabbrev>
++++
Disable a rule.
[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/x-pack/plugins/alerting/docs/openapi[open API specification].
====
[[disable-rule-api-request]]
=== {api-request-title}
`POST <kibana host>:<port>/api/alerting/rule/<id>/_disable`
`POST <kibana host>:<port>/s/<space_id>/api/alerting/rule/<id>/_disable`
=== {api-prereq-title}
You must have `all` privileges for the appropriate {kib} features, depending on
the `consumer` and `rule_type_id` of the rule. For example,
the *Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}*
features, *{observability}*, and *Security* features. For more details, refer to
<<kibana-feature-privileges>>.
[[disable-rule-api-path-params]]
=== {api-path-parms-title}
`id`::
(Required, string) The ID of the rule that you want to disable.
`space_id`::
(Optional, string) An identifier for the space. If `space_id` is not provided in
the URL, the default space is used.
[[disable-rule-api-response-codes]]
=== {api-response-codes-title}
`204`::
Indicates a successful call.
=== {api-examples-title}
[source,sh]
--------------------------------------------------
POST api/alerting/rule/41893910-6bca-11eb-9e0d-85d233e3ee35/_disable
--------------------------------------------------
// KIBANA