Run a watch

PUT /_watcher/watch/_execute

This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.

For testing and debugging purposes, you also have fine-grained control on how the watch runs. You can run the watch without running all of its actions or alternatively by simulating them. You can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs.

You can use the run watch API to run watches that are not yet registered by specifying the watch definition inline. This serves as great tool for testing and debugging your watches prior to adding them to Watcher.

When Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches. If your user is allowed to read index a, but not index b, then the exact same set of rules will apply during execution of a watch.

When using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.

Query parameters

  • debug boolean

    Defines whether the watch runs in debug mode.

application/json

Body

  • Determines how to handle the watch actions as part of the watch execution.

    Hide action_modes attribute Show action_modes attribute object
    • * string Additional properties

      Values are simulate, force_simulate, execute, force_execute, or skip.

  • When present, the watch uses this object as a payload instead of executing its own input.

    Hide alternative_input attribute Show alternative_input attribute object
    • * object Additional properties
  • When set to true, the watch execution uses the always condition. This can also be specified as an HTTP parameter.

  • When set to true, the watch record representing the watch execution result is persisted to the .watcher-history index for the current time. In addition, the status of the watch is updated, possibly throttling subsequent runs. This can also be specified as an HTTP parameter.

  • Hide simulated_actions attributes Show simulated_actions attributes object
  • Hide trigger_data attributes Show trigger_data attributes object
  • watch object
    Hide watch attributes Show watch attributes object
    • actions object Required
      Hide actions attribute Show actions attribute object
      • * object Additional properties
        Hide * attributes Show * attributes object
        • Values are email, webhook, index, logging, slack, or pagerduty.

        • Hide condition attributes Show condition attributes object
          • always object
          • Hide array_compare attribute Show array_compare attribute object
            • * object Additional properties
              Hide * attribute Show * attribute object
          • compare object
            Hide compare attribute Show compare attribute object
            • * object Additional properties
          • never object
          • script object
            Hide script attributes Show script attributes object
        • foreach string
        • name string
        • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

        • Time unit for milliseconds

        • Hide transform attributes Show transform attributes object
          • chain array[object]
          • script object
            Hide script attributes Show script attributes object
        • index object
          Hide index attributes Show index attributes object
          • index string Required
          • doc_id string
          • refresh string

            Values are true, false, or wait_for.

          • op_type string

            Values are index or create.

          • timeout string

            A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.

        • logging object
          Hide logging attributes Show logging attributes object
        • email object
          Hide email attributes Show email attributes object
        • Hide pagerduty attributes Show pagerduty attributes object
        • slack object
          Hide slack attributes Show slack attributes object
        • webhook object
          Hide webhook attributes Show webhook attributes object
          • auth object
            Hide auth attribute Show auth attribute object
          • body string
          • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • headers object
            Hide headers attribute Show headers attribute object
            • * string Additional properties
          • host string
          • method string

            Values are head, get, post, put, or delete.

          • params object
            Hide params attribute Show params attribute object
            • * string Additional properties
          • path string
          • port number
          • proxy object
            Hide proxy attributes Show proxy attributes object
          • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • scheme string

            Values are http or https.

          • url string
    • condition object Required
      Hide condition attributes Show condition attributes object
      • always object
      • Hide array_compare attribute Show array_compare attribute object
        • * object Additional properties
          Hide * attribute Show * attribute object
      • compare object
        Hide compare attribute Show compare attribute object
        • * object Additional properties
      • never object
      • script object
        Hide script attributes Show script attributes object
    • input object Required
      Hide input attributes Show input attributes object
      • chain object
        Hide chain attribute Show chain attribute object
        • inputs array[object] Required
          Hide inputs attribute Show inputs attribute object
      • http object
        Hide http attributes Show http attributes object
        • extract array[string]
        • request object
          Hide request attributes Show request attributes object
          • auth object
            Hide auth attribute Show auth attribute object
          • body string
          • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • headers object
            Hide headers attribute Show headers attribute object
            • * string Additional properties
          • host string
          • method string

            Values are head, get, post, put, or delete.

          • params object
            Hide params attribute Show params attribute object
            • * string Additional properties
          • path string
          • port number
          • proxy object
            Hide proxy attributes Show proxy attributes object
          • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • scheme string

            Values are http or https.

          • url string
        • Values are json, yaml, or text.

      • simple object
        Hide simple attribute Show simple attribute object
        • * object Additional properties
    • metadata object
      Hide metadata attribute Show metadata attribute object
      • * object Additional properties
    • status object
      Hide status attributes Show status attributes object
    • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

    • Time unit for milliseconds

    • Hide transform attributes Show transform attributes object
      • chain array[object]
      • script object
        Hide script attributes Show script attributes object
    • trigger object Required
      Hide trigger attribute Show trigger attribute object
      • schedule object
        Hide schedule attributes Show schedule attributes object
        • cron string
        • daily object
          Hide daily attribute Show daily attribute object
        • hourly object
          Hide hourly attribute Show hourly attribute object
        • interval string

          A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

        • monthly object | array[object]

          One of:
          Hide attributes Show attributes object
          • at array[string] Required
          • on array[number] Required
        • weekly object | array[object]

          One of:
          Hide attributes Show attributes object
          • at array[string] Required
          • on array[string] Required

            Values are sunday, monday, tuesday, wednesday, thursday, friday, or saturday.

        • yearly object | array[object]

          One of:
          Hide attributes Show attributes object
          • at array[string] Required
          • int array[string] Required

            Values are january, february, march, april, may, june, july, august, september, october, november, or december.

          • on array[number] Required

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • _id string Required
    • watch_record object Required
      Hide watch_record attributes Show watch_record attributes object
      • condition object Required
        Hide condition attributes Show condition attributes object
        • always object
        • Hide array_compare attribute Show array_compare attribute object
          • * object Additional properties
            Hide * attribute Show * attribute object
        • compare object
          Hide compare attribute Show compare attribute object
          • * object Additional properties
        • never object
        • script object
          Hide script attributes Show script attributes object
      • input object Required
        Hide input attributes Show input attributes object
        • chain object
          Hide chain attribute Show chain attribute object
          • inputs array[object] Required
            Hide inputs attribute Show inputs attribute object
        • http object
          Hide http attributes Show http attributes object
          • extract array[string]
          • request object
            Hide request attributes Show request attributes object
            • auth object
              Hide auth attribute Show auth attribute object
            • body string
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • headers object
              Hide headers attribute Show headers attribute object
              • * string Additional properties
            • host string
            • method string

              Values are head, get, post, put, or delete.

            • params object
              Hide params attribute Show params attribute object
              • * string Additional properties
            • path string
            • port number
            • proxy object
              Hide proxy attributes Show proxy attributes object
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • scheme string

              Values are http or https.

            • url string
          • Values are json, yaml, or text.

        • simple object
          Hide simple attribute Show simple attribute object
          • * object Additional properties
      • messages array[string] Required
      • metadata object
        Hide metadata attribute Show metadata attribute object
        • * object Additional properties
      • node string Required
      • result object Required
        Hide result attributes Show result attributes object
        • actions array[object] Required
          Hide actions attributes Show actions attributes object
        • condition object Required
          Hide condition attributes Show condition attributes object
          • met boolean Required
          • status string Required

            Values are success, failure, simulated, or throttled.

          • type string Required

            Values are always, never, script, compare, or array_compare.

        • Time unit for milliseconds

        • execution_time 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.

        • input object Required
          Hide input attributes Show input attributes object
          • payload object Required
            Hide payload attribute Show payload attribute object
            • * object Additional properties
          • status string Required

            Values are success, failure, simulated, or throttled.

          • type string Required

            Values are http, search, or simple.

      • state string Required

        Values are awaits_execution, checking, execution_not_needed, throttled, executed, failed, deleted_while_queued, or not_executed_already_queued.

      • trigger_event object Required
        Hide trigger_event attributes Show trigger_event attributes object
      • user string Required
      • watch_id string Required
      • status object
        Hide status attributes Show status attributes object
PUT /_watcher/watch/_execute
curl \
 --request PUT http://api.example.com/_watcher/watch/_execute \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"action_modes":{"additionalProperty1":"simulate","additionalProperty2":"simulate"},"alternative_input":{"additionalProperty1":{},"additionalProperty2":{}},"ignore_condition":true,"record_execution":true,"simulated_actions":{"actions":["string"],"all":{},"use_all":true},"trigger_data":{"":"string"},"watch":{"actions":{"additionalProperty1":{"action_type":"email","condition":{"always":{},"array_compare":{"additionalProperty1":{"path":"string"},"additionalProperty2":{"path":"string"}},"compare":{"additionalProperty1":{},"additionalProperty2":{}},"never":{},"script":{"lang":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"source":"string","id":"string"}},"foreach":"string","max_iterations":42.0,"name":"string","throttle_period":"string","":{"auth":{"basic":{}},"body":"string","connection_timeout":"string","headers":{"additionalProperty1":"string","additionalProperty2":"string"},"host":"string","method":"head","params":{"additionalProperty1":"string","additionalProperty2":"string"},"path":"string","port":42.0,"proxy":{"host":"string","port":42.0},"read_timeout":"string","scheme":"http","url":"string"},"transform":{"chain":[{}],"script":{"lang":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"source":"string","id":"string"},"search":{"request":{"body":{},"indices":["string"],"indices_options":{},"search_type":"query_then_fetch","template":{},"rest_total_hits_as_int":true},"timeout":"string"}},"index":{"index":"string","doc_id":"string","refresh":"true","op_type":"index","timeout":"string","execution_time_field":"string"},"logging":{"level":"string","text":"string","category":"string"},"slack":{"account":"string","message":{"attachments":[{}],"dynamic_attachments":{"attachment_template":{},"list_path":"string"},"from":"string","icon":"string","text":"string","to":["string"]}}},"additionalProperty2":{"action_type":"email","condition":{"always":{},"array_compare":{"additionalProperty1":{"path":"string"},"additionalProperty2":{"path":"string"}},"compare":{"additionalProperty1":{},"additionalProperty2":{}},"never":{},"script":{"lang":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"source":"string","id":"string"}},"foreach":"string","max_iterations":42.0,"name":"string","throttle_period":"string","":{"auth":{"basic":{}},"body":"string","connection_timeout":"string","headers":{"additionalProperty1":"string","additionalProperty2":"string"},"host":"string","method":"head","params":{"additionalProperty1":"string","additionalProperty2":"string"},"path":"string","port":42.0,"proxy":{"host":"string","port":42.0},"read_timeout":"string","scheme":"http","url":"string"},"transform":{"chain":[{}],"script":{"lang":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"source":"string","id":"string"},"search":{"request":{"body":{},"indices":["string"],"indices_options":{},"search_type":"query_then_fetch","template":{},"rest_total_hits_as_int":true},"timeout":"string"}},"index":{"index":"string","doc_id":"string","refresh":"true","op_type":"index","timeout":"string","execution_time_field":"string"},"logging":{"level":"string","text":"string","category":"string"},"slack":{"account":"string","message":{"attachments":[{}],"dynamic_attachments":{"attachment_template":{},"list_path":"string"},"from":"string","icon":"string","text":"string","to":["string"]}}}},"condition":{"always":{},"array_compare":{"additionalProperty1":{"path":"string"},"additionalProperty2":{"path":"string"}},"compare":{"additionalProperty1":{},"additionalProperty2":{}},"never":{},"script":{"lang":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"source":"string","id":"string"}},"input":{"chain":{"inputs":[{"*":{}}]},"http":{"extract":["string"],"request":{"auth":{"basic":{"password":"string","username":"string"}},"body":"string","connection_timeout":"string","headers":{"additionalProperty1":"string","additionalProperty2":"string"},"host":"string","method":"head","params":{"additionalProperty1":"string","additionalProperty2":"string"},"path":"string","port":42.0,"proxy":{"host":"string","port":42.0},"read_timeout":"string","scheme":"http","url":"string"},"response_content_type":"json"},"search":{"extract":["string"],"request":{"body":{"query":{}},"indices":["string"],"indices_options":{"allow_no_indices":true,"expand_wildcards":"string","ignore_unavailable":true,"ignore_throttled":true},"search_type":"query_then_fetch","template":{"explain":true,"id":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"profile":true,"source":"string"},"rest_total_hits_as_int":true},"timeout":"string"},"simple":{"additionalProperty1":{},"additionalProperty2":{}}},"metadata":{"additionalProperty1":{},"additionalProperty2":{}},"status":{"actions":{"additionalProperty1":{"ack":{"state":"awaits_successful_execution","":"string"},"last_execution":{"successful":true,"":"string","reason":"string"},"last_successful_execution":{"successful":true,"":"string","reason":"string"},"last_throttle":{"reason":"string","":"string"}},"additionalProperty2":{"ack":{"state":"awaits_successful_execution","":"string"},"last_execution":{"successful":true,"":"string","reason":"string"},"last_successful_execution":{"successful":true,"":"string","reason":"string"},"last_throttle":{"reason":"string","":"string"}}},"":"string","state":{"active":true,"":"string"},"version":42.0,"execution_state":"string"},"throttle_period":"string","":42.0,"transform":{"chain":[{}],"script":{"lang":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"source":"string","id":"string"},"search":{"request":{"body":{"query":{}},"indices":["string"],"indices_options":{"allow_no_indices":true,"expand_wildcards":"string","ignore_unavailable":true,"ignore_throttled":true},"search_type":"query_then_fetch","template":{"explain":true,"id":"string","params":{"additionalProperty1":{},"additionalProperty2":{}},"profile":true,"source":"string"},"rest_total_hits_as_int":true},"timeout":"string"}},"trigger":{"schedule":{"cron":"string","daily":{"at":["string"]},"hourly":{"minute":[42.0]},"interval":"string","monthly":{"at":["string"],"on":[42.0]},"weekly":{"at":["string"],"on":["sunday"]},"yearly":{"at":["string"],"int":["january"],"on":[42.0]}}}}}'
Request examples
{
  "action_modes": {
    "additionalProperty1": "simulate",
    "additionalProperty2": "simulate"
  },
  "alternative_input": {
    "additionalProperty1": {},
    "additionalProperty2": {}
  },
  "ignore_condition": true,
  "record_execution": true,
  "simulated_actions": {
    "actions": [
      "string"
    ],
    "all": {},
    "use_all": true
  },
  "trigger_data": {
    "": "string"
  },
  "watch": {
    "actions": {
      "additionalProperty1": {
        "action_type": "email",
        "condition": {
          "always": {},
          "array_compare": {
            "additionalProperty1": {
              "path": "string"
            },
            "additionalProperty2": {
              "path": "string"
            }
          },
          "compare": {
            "additionalProperty1": {},
            "additionalProperty2": {}
          },
          "never": {},
          "script": {
            "lang": "string",
            "params": {
              "additionalProperty1": {},
              "additionalProperty2": {}
            },
            "source": "string",
            "id": "string"
          }
        },
        "foreach": "string",
        "max_iterations": 42.0,
        "name": "string",
        "throttle_period": "string",
        "": {
          "auth": {
            "basic": {}
          },
          "body": "string",
          "connection_timeout": "string",
          "headers": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "host": "string",
          "method": "head",
          "params": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "path": "string",
          "port": 42.0,
          "proxy": {
            "host": "string",
            "port": 42.0
          },
          "read_timeout": "string",
          "scheme": "http",
          "url": "string"
        },
        "transform": {
          "chain": [
            {}
          ],
          "script": {
            "lang": "string",
            "params": {
              "additionalProperty1": {},
              "additionalProperty2": {}
            },
            "source": "string",
            "id": "string"
          },
          "search": {
            "request": {
              "body": {},
              "indices": [
                "string"
              ],
              "indices_options": {},
              "search_type": "query_then_fetch",
              "template": {},
              "rest_total_hits_as_int": true
            },
            "timeout": "string"
          }
        },
        "index": {
          "index": "string",
          "doc_id": "string",
          "refresh": "true",
          "op_type": "index",
          "timeout": "string",
          "execution_time_field": "string"
        },
        "logging": {
          "level": "string",
          "text": "string",
          "category": "string"
        },
        "slack": {
          "account": "string",
          "message": {
            "attachments": [
              {}
            ],
            "dynamic_attachments": {
              "attachment_template": {},
              "list_path": "string"
            },
            "from": "string",
            "icon": "string",
            "text": "string",
            "to": [
              "string"
            ]
          }
        }
      },
      "additionalProperty2": {
        "action_type": "email",
        "condition": {
          "always": {},
          "array_compare": {
            "additionalProperty1": {
              "path": "string"
            },
            "additionalProperty2": {
              "path": "string"
            }
          },
          "compare": {
            "additionalProperty1": {},
            "additionalProperty2": {}
          },
          "never": {},
          "script": {
            "lang": "string",
            "params": {
              "additionalProperty1": {},
              "additionalProperty2": {}
            },
            "source": "string",
            "id": "string"
          }
        },
        "foreach": "string",
        "max_iterations": 42.0,
        "name": "string",
        "throttle_period": "string",
        "": {
          "auth": {
            "basic": {}
          },
          "body": "string",
          "connection_timeout": "string",
          "headers": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "host": "string",
          "method": "head",
          "params": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "path": "string",
          "port": 42.0,
          "proxy": {
            "host": "string",
            "port": 42.0
          },
          "read_timeout": "string",
          "scheme": "http",
          "url": "string"
        },
        "transform": {
          "chain": [
            {}
          ],
          "script": {
            "lang": "string",
            "params": {
              "additionalProperty1": {},
              "additionalProperty2": {}
            },
            "source": "string",
            "id": "string"
          },
          "search": {
            "request": {
              "body": {},
              "indices": [
                "string"
              ],
              "indices_options": {},
              "search_type": "query_then_fetch",
              "template": {},
              "rest_total_hits_as_int": true
            },
            "timeout": "string"
          }
        },
        "index": {
          "index": "string",
          "doc_id": "string",
          "refresh": "true",
          "op_type": "index",
          "timeout": "string",
          "execution_time_field": "string"
        },
        "logging": {
          "level": "string",
          "text": "string",
          "category": "string"
        },
        "slack": {
          "account": "string",
          "message": {
            "attachments": [
              {}
            ],
            "dynamic_attachments": {
              "attachment_template": {},
              "list_path": "string"
            },
            "from": "string",
            "icon": "string",
            "text": "string",
            "to": [
              "string"
            ]
          }
        }
      }
    },
    "condition": {
      "always": {},
      "array_compare": {
        "additionalProperty1": {
          "path": "string"
        },
        "additionalProperty2": {
          "path": "string"
        }
      },
      "compare": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      },
      "never": {},
      "script": {
        "lang": "string",
        "params": {
          "additionalProperty1": {},
          "additionalProperty2": {}
        },
        "source": "string",
        "id": "string"
      }
    },
    "input": {
      "chain": {
        "inputs": [
          {
            "*": {}
          }
        ]
      },
      "http": {
        "extract": [
          "string"
        ],
        "request": {
          "auth": {
            "basic": {
              "password": "string",
              "username": "string"
            }
          },
          "body": "string",
          "connection_timeout": "string",
          "headers": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "host": "string",
          "method": "head",
          "params": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "path": "string",
          "port": 42.0,
          "proxy": {
            "host": "string",
            "port": 42.0
          },
          "read_timeout": "string",
          "scheme": "http",
          "url": "string"
        },
        "response_content_type": "json"
      },
      "search": {
        "extract": [
          "string"
        ],
        "request": {
          "body": {
            "query": {}
          },
          "indices": [
            "string"
          ],
          "indices_options": {
            "allow_no_indices": true,
            "expand_wildcards": "string",
            "ignore_unavailable": true,
            "ignore_throttled": true
          },
          "search_type": "query_then_fetch",
          "template": {
            "explain": true,
            "id": "string",
            "params": {
              "additionalProperty1": {},
              "additionalProperty2": {}
            },
            "profile": true,
            "source": "string"
          },
          "rest_total_hits_as_int": true
        },
        "timeout": "string"
      },
      "simple": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      }
    },
    "metadata": {
      "additionalProperty1": {},
      "additionalProperty2": {}
    },
    "status": {
      "actions": {
        "additionalProperty1": {
          "ack": {
            "state": "awaits_successful_execution",
            "": "string"
          },
          "last_execution": {
            "successful": true,
            "": "string",
            "reason": "string"
          },
          "last_successful_execution": {
            "successful": true,
            "": "string",
            "reason": "string"
          },
          "last_throttle": {
            "reason": "string",
            "": "string"
          }
        },
        "additionalProperty2": {
          "ack": {
            "state": "awaits_successful_execution",
            "": "string"
          },
          "last_execution": {
            "successful": true,
            "": "string",
            "reason": "string"
          },
          "last_successful_execution": {
            "successful": true,
            "": "string",
            "reason": "string"
          },
          "last_throttle": {
            "reason": "string",
            "": "string"
          }
        }
      },
      "": "string",
      "state": {
        "active": true,
        "": "string"
      },
      "version": 42.0,
      "execution_state": "string"
    },
    "throttle_period": "string",
    "": 42.0,
    "transform": {
      "chain": [
        {}
      ],
      "script": {
        "lang": "string",
        "params": {
          "additionalProperty1": {},
          "additionalProperty2": {}
        },
        "source": "string",
        "id": "string"
      },
      "search": {
        "request": {
          "body": {
            "query": {}
          },
          "indices": [
            "string"
          ],
          "indices_options": {
            "allow_no_indices": true,
            "expand_wildcards": "string",
            "ignore_unavailable": true,
            "ignore_throttled": true
          },
          "search_type": "query_then_fetch",
          "template": {
            "explain": true,
            "id": "string",
            "params": {
              "additionalProperty1": {},
              "additionalProperty2": {}
            },
            "profile": true,
            "source": "string"
          },
          "rest_total_hits_as_int": true
        },
        "timeout": "string"
      }
    },
    "trigger": {
      "schedule": {
        "cron": "string",
        "daily": {
          "at": [
            "string"
          ]
        },
        "hourly": {
          "minute": [
            42.0
          ]
        },
        "interval": "string",
        "monthly": {
          "at": [
            "string"
          ],
          "on": [
            42.0
          ]
        },
        "weekly": {
          "at": [
            "string"
          ],
          "on": [
            "sunday"
          ]
        },
        "yearly": {
          "at": [
            "string"
          ],
          "int": [
            "january"
          ],
          "on": [
            42.0
          ]
        }
      }
    }
  }
}
Response examples (200)
{
  "_id": "string",
  "watch_record": {
    "condition": {
      "always": {},
      "array_compare": {
        "additionalProperty1": {
          "path": "string"
        },
        "additionalProperty2": {
          "path": "string"
        }
      },
      "compare": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      },
      "never": {},
      "script": {
        "lang": "string",
        "params": {
          "additionalProperty1": {},
          "additionalProperty2": {}
        },
        "source": "string",
        "id": "string"
      }
    },
    "input": {
      "chain": {
        "inputs": [
          {
            "*": {}
          }
        ]
      },
      "http": {
        "extract": [
          "string"
        ],
        "request": {
          "auth": {
            "basic": {}
          },
          "body": "string",
          "connection_timeout": "string",
          "headers": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "host": "string",
          "method": "head",
          "params": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "path": "string",
          "port": 42.0,
          "proxy": {
            "host": "string",
            "port": 42.0
          },
          "read_timeout": "string",
          "scheme": "http",
          "url": "string"
        },
        "response_content_type": "json"
      },
      "search": {
        "extract": [
          "string"
        ],
        "request": {
          "body": {
            "query": {}
          },
          "indices": [
            "string"
          ],
          "indices_options": {
            "allow_no_indices": true,
            "expand_wildcards": "string",
            "ignore_unavailable": true,
            "ignore_throttled": true
          },
          "search_type": "query_then_fetch",
          "template": {
            "explain": true,
            "id": "string",
            "params": {},
            "profile": true,
            "source": "string"
          },
          "rest_total_hits_as_int": true
        },
        "timeout": "string"
      },
      "simple": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      }
    },
    "messages": [
      "string"
    ],
    "metadata": {
      "additionalProperty1": {},
      "additionalProperty2": {}
    },
    "node": "string",
    "result": {
      "actions": [
        {
          "email": {
            "account": "string",
            "message": {},
            "reason": "string"
          },
          "id": "string",
          "index": {
            "response": {}
          },
          "logging": {
            "logged_text": "string"
          },
          "pagerduty": {
            "event": {},
            "reason": "string",
            "response": {}
          },
          "reason": "string",
          "slack": {
            "account": "string",
            "message": {}
          },
          "status": "success",
          "type": "email",
          "webhook": {
            "response": {}
          },
          "error": {
            "type": "string",
            "reason": "string",
            "stack_trace": "string",
            "caused_by": {},
            "root_cause": [
              {}
            ],
            "suppressed": [
              {}
            ]
          }
        }
      ],
      "condition": {
        "met": true,
        "status": "success",
        "type": "always"
      },
      "": "string",
      "input": {
        "payload": {
          "additionalProperty1": {},
          "additionalProperty2": {}
        },
        "status": "success",
        "type": "http"
      }
    },
    "state": "awaits_execution",
    "trigger_event": {
      "manual": {
        "schedule": {
          "": "string"
        }
      },
      "": "string",
      "type": "string"
    },
    "user": "string",
    "watch_id": "string",
    "status": {
      "actions": {
        "additionalProperty1": {
          "ack": {
            "state": "awaits_successful_execution"
          },
          "last_execution": {
            "successful": true,
            "reason": "string"
          },
          "last_successful_execution": {
            "successful": true,
            "reason": "string"
          },
          "last_throttle": {
            "reason": "string"
          }
        },
        "additionalProperty2": {
          "ack": {
            "state": "awaits_successful_execution"
          },
          "last_execution": {
            "successful": true,
            "reason": "string"
          },
          "last_successful_execution": {
            "successful": true,
            "reason": "string"
          },
          "last_throttle": {
            "reason": "string"
          }
        }
      },
      "": "string",
      "state": {
        "active": true,
        "": "string"
      },
      "version": 42.0,
      "execution_state": "string"
    }
  }
}