Activate a watch Generally available

PUT /_watcher/watch/{watch_id}/_activate

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
          Hide * attributes Show * attributes object
          • ack object Required
            Hide ack attributes Show ack attributes object
            • state string Required

              Values are awaits_successful_execution, ackable, or acked.

            • timestamp string
          • last_execution object
            Hide last_execution attributes Show last_execution attributes object
            • successful boolean Required
            • timestamp string
            • reason string
          • last_successful_execution object
            Hide last_successful_execution attributes Show last_successful_execution attributes object
            • successful boolean Required
            • timestamp string
            • reason string
          • last_throttle object
            Hide last_throttle attributes Show last_throttle attributes object
            • reason string Required
            • timestamp string
      • state object Required
        Hide state attributes Show state attributes object
        • active boolean Required
        • timestamp string | number Required

          A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.

          One of:

          Time unit for milliseconds

      • version number Required
PUT /_watcher/watch/{watch_id}/_activate
PUT _watcher/watch/my_watch/_activate
resp = client.watcher.activate_watch(
    watch_id="my_watch",
)
const response = await client.watcher.activateWatch({
  watch_id: "my_watch",
});
response = client.watcher.activate_watch(
  watch_id: "my_watch"
)
$resp = $client->watcher()->activateWatch([
    "watch_id" => "my_watch",
]);
curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/watch/my_watch/_activate"