mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
As there are no master node operations anymore. * TransportActions are regular Actions now * Watcher requests are now ActionRequests, no MasterNodeRequests anymore * REST spec does not contain master node timeout parameters anymore * WatcherLifeCycleService does not have a check anymore if watcher is able to run distributed, this will be a given in 7.0 * Some serialization BWC checks against version 5 have been removed Original commit: elastic/x-pack-elasticsearch@4607dd538c
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
[role="xpack"]
|
|
[[watcher-api-delete-watch]]
|
|
=== Delete Watch API
|
|
|
|
The DELETE watch API removes a watch (identified by its `id`) from {watcher}.
|
|
Once removed, the document representing the watch in the `.watches` index is
|
|
gone and it will never be executed again.
|
|
|
|
Please note that 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 via this API only. Do not delete the
|
|
watch directly from the `.watches` index using Elasticsearch's
|
|
DELETE Document API. When {security} is enabled, make sure no `write`
|
|
privileges are granted to anyone over the `.watches` index.
|
|
|
|
The following example deletes a watch with the `my-watch` id:
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
DELETE _xpack/watcher/watch/my_watch
|
|
--------------------------------------------------
|
|
// CONSOLE
|
|
// TEST[setup:my_active_watch]
|
|
|
|
Response:
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
{
|
|
"found": true,
|
|
"_id": "my_watch",
|
|
"_version": 2
|
|
}
|
|
--------------------------------------------------
|
|
// TESTRESPONSE
|
|
|