mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 01:44:36 -04:00
**Problem:** For historical reasons, source files for the Elasticsearch Guide's security, watcher, and Logstash API docs are housed in the `x-pack/docs` directory. This can confuse new contributors who expect Elasticsearch Guide docs to be located in `docs/reference`. **Solution:** - Move the security, watcher, and Logstash API doc source files to the `docs/reference` directory - Update doc snippet tests to use security Rel: https://github.com/elastic/platform-docs-team/issues/208
35 lines
1.3 KiB
Text
35 lines
1.3 KiB
Text
[role="xpack"]
|
|
[[managing-watches]]
|
|
== Managing watches
|
|
|
|
{watcher} provides as set of APIs you can use to manage your watches:
|
|
|
|
* Use the <<watcher-api-put-watch,create or update watch API>> to add or update watches
|
|
* Use the <<watcher-api-get-watch,get watch API>> to retrieve watches
|
|
* Use the <<watcher-api-delete-watch,delete watch API>> to delete watches
|
|
* Use the <<watcher-api-activate-watch,activate watch API>> to activate watches
|
|
* Use the <<watcher-api-deactivate-watch,deactivate watch API>> to deactivate watches
|
|
* Use the <<watcher-api-ack-watch,ack watch API>> to acknowledge watches
|
|
|
|
[discrete]
|
|
[[listing-watches]]
|
|
=== Listing watches
|
|
|
|
Currently there is not dedicated API for listing the stored watches. However,
|
|
since {watcher} stores its watches in the `.watches` index, you can list them
|
|
by executing a search on this index.
|
|
|
|
IMPORTANT: You can only perform read actions on the `.watches` index. You must
|
|
use the {watcher} APIs to create, update, and delete watches. If {es}
|
|
{security-features} are enabled, we recommend you only grant users
|
|
`read` privileges on the `.watches` index.
|
|
|
|
For example, the following returns the first 100 watches:
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
GET /_watcher/_query/watches
|
|
{
|
|
"size" : 100
|
|
}
|
|
--------------------------------------------------
|