OpenSearch/watcher/docs/managing-watches/listing-watches.asciidoc

24 lines
787 B
Plaintext
Raw Normal View History

[[listing-watches]]
=== Listing Watches
Watcher stores watches in the `.watches` index. You can search this index to see what watches are
configured.
IMPORTANT: You can only perform read actions on the `.watches` index. You must use the Watcher
APIs to create, update, and delete watches. If you are using Shield, we recommend only granting
users `read` privileges for the `.watches` index.
To get the ids of all configured watches, run the following search query:
[source,js]
--------------------------------------------------
GET .watches/_search
{
"fields" : [], <1>
"query" : {"match_all" : { } }
}
--------------------------------------------------
// AUTOSENSE
<1> If you omit the `fields` option, the search returns the full watch definition and status
of each watch.