Acknowledge a watch Generally available
All methods and paths for this operation:
Acknowledging a watch enables you to manually throttle the execution of the watch's actions.
The acknowledgement state of an action is stored in the status.actions.<id>.ack.state
structure.
IMPORTANT: If the specified watch is currently being executed, this API will return an error The reason for this behavior is to prevent overwriting the watch status from a watch execution.
Acknowledging an action throttles further executions of that action until its ack.state
is reset to awaits_successful_execution
. This happens when the condition of the watch is not met (the condition evaluates to false). To demonstrate how throttling works in practice and how it can be configured for individual actions within a watch, refer to External documentation.
Required authorization
- Cluster privileges:
manage_watcher
POST _watcher/watch/my_watch/_ack
resp = client.watcher.ack_watch( watch_id="my_watch", )
const response = await client.watcher.ackWatch({ watch_id: "my_watch", });
response = client.watcher.ack_watch( watch_id: "my_watch" )
$resp = $client->watcher()->ackWatch([ "watch_id" => "my_watch", ]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/watch/my_watch/_ack"
client.watcher().ackWatch(a -> a .watchId("my_watch") );
{ "status": { "state": { "active": true, "timestamp": "2015-05-26T18:04:27.723Z" }, "last_checked": "2015-05-26T18:04:27.753Z", "last_met_condition": "2015-05-26T18:04:27.763Z", "actions": { "test_index": { "ack" : { "timestamp": "2015-05-26T18:04:27.713Z", "state": "acked" }, "last_execution" : { "timestamp": "2015-05-25T18:04:27.733Z", "successful": true }, "last_successful_execution" : { "timestamp": "2015-05-25T18:04:27.773Z", "successful": true } } }, "execution_state": "executed", "version": 2 } }