Spec-Zone.ru › Elasticsearch 7
›Elasticsearch Guide [7.17] ›Watcher

Managing watches

Watcher provides as set of APIs you can use to manage your watches:

  • Use the create or update watch API to add or update watches
  • Use the get watch API to retrieve watches
  • Use the delete watch API to delete watches
  • Use the activate watch API to activate watches
  • Use the deactivate watch API to deactivate watches
  • Use the ack watch API to acknowledge 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.

You can only perform read actions on the .watches index. You must use the Watcher APIs to create, update, and delete watches. If Elasticsearch 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:

GET /_watcher/_query/watches
{
  "size" : 100
}

© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/managing-watches.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API