Delete a watch
Generally available
When the watch is removed, the document representing the watch in the .watches
index is gone and it will never be run again.
Deleting a watch does not delete any watch execution records related to this watch from the watch history.
IMPORTANT: Deleting a watch must be done by using only this API.
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 for the .watches
index.
Required authorization
- Cluster privileges:
manage_watcher
DELETE
/_watcher/watch/{id}
curl \
--request DELETE 'http://api.example.com/_watcher/watch/{id}' \
--header "Authorization: $API_KEY"
Response examples (200)
A successful response from `DELETE _watcher/watch/my_watch`.
{
"found": true,
"_id": "my_watch",
"_version": 2
}