Deactivate a watch Generally available

POST /_watcher/watch/{watch_id}/_deactivate

All methods and paths for this operation:

PUT /_watcher/watch/{watch_id}/_deactivate

POST /_watcher/watch/{watch_id}/_deactivate

A watch can be either active or inactive.

Required authorization

  • Cluster privileges: manage_watcher
External documentation

Path parameters

  • watch_id string Required

    The watch identifier.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • status object Required
      Hide status attributes Show status attributes object
      • actions object Required
        Hide actions attribute Show actions attribute object
        • * object Additional properties
      • state object Required
        Hide state attributes Show state attributes object
        • active boolean Required
        • timestamp
      • version number Required
POST /_watcher/watch/{watch_id}/_deactivate
PUT _watcher/watch/my_watch/_deactivate
resp = client.watcher.deactivate_watch(
    watch_id="my_watch",
)
const response = await client.watcher.deactivateWatch({
  watch_id: "my_watch",
});
response = client.watcher.deactivate_watch(
  watch_id: "my_watch"
)
$resp = $client->watcher()->deactivateWatch([
    "watch_id" => "my_watch",
]);
curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/watch/my_watch/_deactivate"
client.watcher().deactivateWatch(d -> d
    .watchId("my_watch")
);