原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/watcher-api-delete-watch.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/watcher-api-delete-watch.html
本地英文版地址: ../en/watcher-api-delete-watch.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Delete watch APIedit
Removes a watch from Watcher.
Requestedit
DELETE _watcher/watch/<watch_id>
Prerequisitesedit
-
You must have
manage_watcher
cluster privileges to use this API. For more information, see Security privileges.
Descriptionedit
When the watch is removed, the document representing the watch in the .watches
index is gone and it will never be run again.
Please note that deleting a watch does not delete any watch execution records related to this watch from the watch history.
Deleting a watch must be done via this API only. Do not delete the
watch directly from the .watches
index using the Elasticsearch
DELETE Document API. When Elasticsearch security features are enabled, make
sure no write
privileges are granted to anyone over the .watches
index.
Path parametersedit
-
<watch_id>
- (Required, string) Identifier for the watch.
Examplesedit
The following example deletes a watch with the my-watch
id:
DELETE _watcher/watch/my_watch
Response:
{ "found": true, "_id": "my_watch", "_version": 2 }