Get watch API

edit

This API retrieves a watch by its ID.

Request

edit

GET _watcher/watch/<watch_id>

Path Parameters

edit
watch_id (required)
(string) Identifier for the watch.

Authorization

edit

You must have manage_watcher or monitor_watcher cluster privileges to use this API. For more information, see Security Privileges.

Examples

edit

The following example gets a watch with my-watch id:

GET _watcher/watch/my_watch

Response:

{
  "found": true,
  "_id": "my_watch",
  "_seq_no": 0,
  "_primary_term": 1,
  "_version": 1,
  "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"
        }
      }
    }
  }
}

The current status of the watch