mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
52 lines
1.4 KiB
Text
52 lines
1.4 KiB
Text
[[enable-rule-api]]
|
|
== Enable rule API
|
|
++++
|
|
<titleabbrev>Enable rule</titleabbrev>
|
|
++++
|
|
|
|
Enable 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].
|
|
====
|
|
|
|
[[enable-rule-api-request]]
|
|
=== {api-request-title}
|
|
|
|
`POST <kibana host>:<port>/api/alerting/rule/<id>/_enable`
|
|
|
|
`POST <kibana host>:<port>/s/<space_id>/api/alerting/rule/<id>/_enable`
|
|
|
|
=== {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>>.
|
|
|
|
[[enable-rule-api-path-params]]
|
|
=== {api-path-parms-title}
|
|
|
|
`id`::
|
|
(Required, string) The ID of the rule that you want to enable.
|
|
|
|
`space_id`::
|
|
(Optional, string) An identifier for the space. If `space_id` is not provided in
|
|
the URL, the default space is used.
|
|
|
|
[[enable-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/_enable
|
|
--------------------------------------------------
|
|
// KIBANA
|