WARNING: Version 5.1 of the Elastic Stack has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Get Watch API
editGet Watch API
editThis API retrieves a watch by its id.
The following example gets a watch with my-watch
id:
GET _xpack/watcher/watch/my_watch
Response:
{ "found": true, "_id": "my_watch", "_status": { "version": 1, "state": { "active": true, "timestamp": "2015-05-26T18:21:08.630Z" }, "actions": { "test_index": { "ack": { "timestamp": "2015-05-26T18:21:08.630Z", "state": "awaits_successful_execution" } } } }, "watch": { "input": { "simple": { "payload": { "send": "yes" } } }, "condition": { "always": {} }, "trigger": { "schedule": { "hourly": { "minute": [0, 5] } } }, "actions": { "test_index": { "index": { "index": "test", "doc_type": "test2" } } } } }