kibana/docs/api/alerting/enable_rule.asciidoc
ymao1 b544be6ff2
[Alerting] Return 400 Bad Request errors when creating/enabling/updating rules using API key authentication (#98088)
* Catching API key creation errors and throwing bad request errors instead

* Catching API key creation errors and throwing bad request errors instead

* Adding warning to docs

* Updating error messages

* Updating tests

* Updating warning wording in docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-27 07:46:35 -04:00

41 lines
939 B
Text

[[enable-rule-api]]
=== Enable rule API
++++
<titleabbrev>Enable rule</titleabbrev>
++++
Enable a rule.
WARNING: This API supports <<token-api-authentication>> only.
[[enable-rule-api-request]]
==== Request
`POST <kibana host>:<port>/api/alerting/rule/<id>/_enable`
`POST <kibana host>:<port>/s/<space_id>/api/alerting/rule/<id>/_enable`
[[enable-rule-api-path-params]]
==== Path parameters
`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]]
==== Response code
`200`::
Indicates a successful call.
==== Example
Enable a rule with ID:
[source,sh]
--------------------------------------------------
$ curl -X POST api/alerting/rule/41893910-6bca-11eb-9e0d-85d233e3ee35/_enable
--------------------------------------------------
// KIBANA