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 execute the watch without executing 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 execution.
Query parameters
-
debug boolean
Defines whether the watch runs in debug mode.
Body
-
action_modes object
Determines how to handle the watch actions as part of the watch execution.
Hide action_modes attribute Show action_modes attribute object
-
Values are
simulate
,force_simulate
,execute
,force_execute
, orskip
.
-
-
alternative_input object
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
-
Additional properties are allowed.
-
-
ignore_condition boolean
When set to
true
, the watch execution uses the always condition. This can also be specified as an HTTP parameter. -
record_execution boolean
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 executions. This can also be specified as an HTTP parameter. -
simulated_actions object
Additional properties are allowed.
-
trigger_data object
Additional properties are allowed.
Hide trigger_data attributes Show trigger_data attributes object
scheduled_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.
One of: Time unit for milliseconds
triggered_time string | number
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
-
watch object
Additional properties are allowed.
Hide watch attributes Show watch attributes object
-
Hide actions attribute Show actions attribute object
-
Additional properties are allowed.
Hide * attributes Show * attributes object
-
action_type string
Values are
email
,webhook
,index
,logging
,slack
, orpagerduty
. -
condition object
Additional properties are allowed.
Hide condition attributes Show condition attributes object
-
always object
Additional properties are allowed.
-
array_compare object
-
compare object
Hide compare attribute Show compare attribute object
-
never object
Additional properties are allowed.
-
script object
Additional properties are allowed.
-
-
foreach string
-
max_iterations number
-
name string
-
throttle_period string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
throttle_period_in_millis number
Time unit for milliseconds
-
transform object
Additional properties are allowed.
Hide transform attributes Show transform attributes object
-
chain array[object]
Additional properties are allowed.
-
script object
Additional properties are allowed.
-
search object
Additional properties are allowed.
Hide search attributes Show search attributes object
-
Additional properties are allowed.
Hide request attributes Show request attributes object
-
body object
Additional properties are allowed.
-
indices array[string]
-
indices_options object
Additional properties are allowed.
-
search_type string
Values are
query_then_fetch
ordfs_query_then_fetch
. -
template object
Additional properties are allowed.
-
rest_total_hits_as_int boolean
-
-
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
-
-
-
index object
Additional properties are allowed.
Hide index attributes Show index attributes object
-
doc_id string
-
refresh string
Values are
true
,false
, orwait_for
. -
op_type string
Values are
index
orcreate
. -
timeout string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
execution_time_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
logging object
Additional properties are allowed.
-
email object
Additional properties are allowed.
Hide email attributes Show email attributes object
-
id string
-
bcc array[string]
-
body object
Additional properties are allowed.
-
cc array[string]
-
from string
-
priority string
Values are
lowest
,low
,normal
,high
, orhighest
. -
reply_to array[string]
-
sent_date string
-
attachments object
Hide attachments attribute Show attachments attribute object
-
Additional properties are allowed.
-
-
-
pagerduty object
Additional properties are allowed.
Hide pagerduty attributes Show pagerduty attributes object
-
account string
-
client string
-
client_url string
-
contexts array[object]
Additional properties are allowed.
-
event_type string
Values are
trigger
,resolve
, oracknowledge
. -
proxy object
Additional properties are allowed.
-
-
slack object
Additional properties are allowed.
Hide slack attributes Show slack attributes object
-
account string
-
Additional properties are allowed.
Hide message attributes Show message attributes object
-
Additional properties are allowed.
-
dynamic_attachments object
Additional properties are allowed.
Hide dynamic_attachments attributes Show dynamic_attachments attributes object
-
Additional properties are allowed.
-
-
icon string
-
-
-
webhook object
Additional properties are allowed.
Hide webhook attributes Show webhook attributes object
-
auth object
Additional properties are allowed.
Hide auth attribute Show auth attribute object
-
Additional properties are allowed.
-
-
body string
-
connection_timeout string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
headers object
Hide headers attribute Show headers attribute object
-
host string
-
method string
Values are
head
,get
,post
,put
, ordelete
. -
params object
Hide params attribute Show params attribute object
-
path string
-
port number
-
proxy object
Additional properties are allowed.
-
read_timeout string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
scheme string
Values are
http
orhttps
. -
url string
-
-
-
-
Additional properties are allowed.
Hide condition attributes Show condition attributes object
-
always object
Additional properties are allowed.
-
array_compare object
-
compare object
Hide compare attribute Show compare attribute object
-
never object
Additional properties are allowed.
-
script object
Additional properties are allowed.
-
-
Additional properties are allowed.
Hide input attributes Show input attributes object
-
chain object
Additional properties are allowed.
-
http object
Additional properties are allowed.
Hide http attributes Show http attributes object
-
extract array[string]
-
request object
Additional properties are allowed.
Hide request attributes Show request attributes object
-
auth object
Additional properties are allowed.
-
body string
-
connection_timeout string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
headers object
Hide headers attribute Show headers attribute object
-
host string
-
method string
Values are
head
,get
,post
,put
, ordelete
. -
params object
Hide params attribute Show params attribute object
-
path string
-
port number
-
proxy object
Additional properties are allowed.
-
read_timeout string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
scheme string
Values are
http
orhttps
. -
url string
-
-
response_content_type string
Values are
json
,yaml
, ortext
.
-
-
search object
Additional properties are allowed.
Hide search attributes Show search attributes object
-
extract array[string]
-
Additional properties are allowed.
Hide request attributes Show request attributes object
-
body object
Additional properties are allowed.
Hide body attribute Show body attribute object
-
Additional properties are allowed.
-
-
indices array[string]
-
indices_options object
Additional properties are allowed.
Hide indices_options attributes Show indices_options attributes object
-
allow_no_indices boolean
If false, the request returns an error if any wildcard expression, index alias, or
_all
value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targetingfoo*,bar*
returns an error if an index starts withfoo
but no index starts withbar
. -
expand_wildcards string | array[string]
-
ignore_unavailable boolean
If true, missing or closed indices are not included in the response.
-
ignore_throttled boolean
If true, concrete, expanded or aliased indices are ignored when frozen.
-
-
search_type string
Values are
query_then_fetch
ordfs_query_then_fetch
. -
template object
Additional properties are allowed.
Hide template attributes Show template attributes object
-
explain boolean
-
id string
-
params object
Hide params attribute Show params attribute object
-
Additional properties are allowed.
-
-
profile boolean
-
source string
An inline search template. Supports the same parameters as the search API's request body. Also supports Mustache variables. If no id is specified, this parameter is required.
-
-
rest_total_hits_as_int boolean
-
-
timeout string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
-
-
simple object
Hide simple attribute Show simple attribute object
-
Additional properties are allowed.
-
-
-
metadata object
Hide metadata attribute Show metadata attribute object
-
Additional properties are allowed.
-
-
status object
Additional properties are allowed.
Hide status attributes Show status attributes object
-
Hide actions attribute Show actions attribute object
-
Additional properties are allowed.
Hide * attributes Show * attributes object
-
Additional properties are allowed.
-
last_execution object
Additional properties are allowed.
Hide last_execution attributes Show last_execution attributes object
-
last_successful_execution object
Additional properties are allowed.
Hide last_successful_execution attributes Show last_successful_execution attributes object
-
last_throttle object
Additional properties are allowed.
-
-
last_checked string | number
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
last_met_condition string | number
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
-
Additional properties are allowed.
Hide state attributes Show state attributes object
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
-
execution_state string
-
-
throttle_period string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
throttle_period_in_millis number
Time unit for milliseconds
-
transform object
Additional properties are allowed.
Hide transform attributes Show transform attributes object
-
chain array[object]
Additional properties are allowed.
-
script object
Additional properties are allowed.
-
search object
Additional properties are allowed.
Hide search attributes Show search attributes object
-
Additional properties are allowed.
Hide request attributes Show request attributes object
-
body object
Additional properties are allowed.
Hide body attribute Show body attribute object
-
Additional properties are allowed.
-
-
indices array[string]
-
indices_options object
Additional properties are allowed.
Hide indices_options attributes Show indices_options attributes object
-
allow_no_indices boolean
If false, the request returns an error if any wildcard expression, index alias, or
_all
value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targetingfoo*,bar*
returns an error if an index starts withfoo
but no index starts withbar
. -
expand_wildcards string | array[string]
-
ignore_unavailable boolean
If true, missing or closed indices are not included in the response.
-
ignore_throttled boolean
If true, concrete, expanded or aliased indices are ignored when frozen.
-
-
search_type string
Values are
query_then_fetch
ordfs_query_then_fetch
. -
template object
Additional properties are allowed.
Hide template attributes Show template attributes object
-
explain boolean
-
id string
-
params object
Hide params attribute Show params attribute object
-
Additional properties are allowed.
-
-
profile boolean
-
source string
An inline search template. Supports the same parameters as the search API's request body. Also supports Mustache variables. If no id is specified, this parameter is required.
-
-
rest_total_hits_as_int boolean
-
-
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
-
-
-
Additional properties are allowed.
Hide trigger attribute Show trigger attribute object
-
schedule object
Additional properties are allowed.
Hide schedule attributes Show schedule attributes object
-
timezone string
-
cron string
-
daily object
Additional properties are allowed.
Hide daily attribute Show daily attribute object
-
A time of day, expressed either as
hh:mm
,noon
,midnight
, or an hour/minutes structure.One of: Additional properties are allowed.
-
-
hourly object
Additional properties are allowed.
Hide hourly attribute Show hourly attribute object
-
interval string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
-
-
-
Responses
-
200 application/json
Hide response attributes Show response attributes object
-
Additional properties are allowed.
Hide watch_record attributes Show watch_record attributes object
-
Additional properties are allowed.
Hide condition attributes Show condition attributes object
-
always object
Additional properties are allowed.
-
array_compare object
-
compare object
Hide compare attribute Show compare attribute object
-
never object
Additional properties are allowed.
-
script object
Additional properties are allowed.
-
-
Additional properties are allowed.
Hide input attributes Show input attributes object
-
chain object
Additional properties are allowed.
-
http object
Additional properties are allowed.
Hide http attributes Show http attributes object
-
extract array[string]
-
request object
Additional properties are allowed.
Hide request attributes Show request attributes object
-
auth object
Additional properties are allowed.
Hide auth attribute Show auth attribute object
-
Additional properties are allowed.
-
-
body string
-
connection_timeout string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
headers object
Hide headers attribute Show headers attribute object
-
host string
-
method string
Values are
head
,get
,post
,put
, ordelete
. -
params object
Hide params attribute Show params attribute object
-
path string
-
port number
-
proxy object
Additional properties are allowed.
-
read_timeout string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
scheme string
Values are
http
orhttps
. -
url string
-
-
response_content_type string
Values are
json
,yaml
, ortext
.
-
-
search object
Additional properties are allowed.
Hide search attributes Show search attributes object
-
extract array[string]
-
Additional properties are allowed.
Hide request attributes Show request attributes object
-
body object
Additional properties are allowed.
Hide body attribute Show body attribute object
-
Additional properties are allowed.
-
-
indices array[string]
-
indices_options object
Additional properties are allowed.
Hide indices_options attributes Show indices_options attributes object
-
allow_no_indices boolean
If false, the request returns an error if any wildcard expression, index alias, or
_all
value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targetingfoo*,bar*
returns an error if an index starts withfoo
but no index starts withbar
. -
expand_wildcards string | array[string]
-
ignore_unavailable boolean
If true, missing or closed indices are not included in the response.
-
ignore_throttled boolean
If true, concrete, expanded or aliased indices are ignored when frozen.
-
-
search_type string
Values are
query_then_fetch
ordfs_query_then_fetch
. -
template object
Additional properties are allowed.
Hide template attributes Show template attributes object
-
rest_total_hits_as_int boolean
-
-
timeout string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
-
-
simple object
Hide simple attribute Show simple attribute object
-
Additional properties are allowed.
-
-
-
metadata object
Hide metadata attribute Show metadata attribute object
-
Additional properties are allowed.
-
-
Additional properties are allowed.
Hide result attributes Show result attributes object
-
Hide actions attributes Show actions attributes object
-
email object
Additional properties are allowed.
-
index object
Additional properties are allowed.
Hide index attribute Show index attribute object
-
Additional properties are allowed.
-
-
logging object
Additional properties are allowed.
Hide logging attribute Show logging attribute object
-
pagerduty object
Additional properties are allowed.
-
reason string
-
slack object
Additional properties are allowed.
-
Values are
success
,failure
,simulated
, orthrottled
. -
Values are
email
,webhook
,index
,logging
,slack
, orpagerduty
. -
webhook object
Additional properties are allowed.
-
error object
Additional properties are allowed.
Hide error attributes Show error attributes object
-
The type of error
-
reason string
A human-readable explanation of the error, in english
-
stack_trace string
The server stack trace. Present only if the
error_trace=true
parameter was sent with the request. -
caused_by object
Additional properties are allowed.
-
root_cause array[object]
-
suppressed array[object]
-
-
-
Additional properties are allowed.
-
execution_duration number
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.
One of: Time unit for milliseconds
-
Additional properties are allowed.
Hide input attributes Show input attributes object
-
-
Values are
awaits_execution
,checking
,execution_not_needed
,throttled
,executed
,failed
,deleted_while_queued
, ornot_executed_already_queued
. -
Additional properties are allowed.
Hide trigger_event attributes Show trigger_event attributes object
-
Additional properties are allowed.
Hide manual attribute Show manual attribute object
-
schedule object
Additional properties are allowed.
Hide schedule attributes Show schedule attributes object
-
scheduled_time string
-
triggered_time string
-
-
triggered_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.
One of: Time unit for milliseconds
-
-
status object
Additional properties are allowed.
Hide status attributes Show status attributes object
-
Hide actions attribute Show actions attribute object
-
Additional properties are allowed.
Hide * attributes Show * attributes object
-
Additional properties are allowed.
-
last_execution object
Additional properties are allowed.
Hide last_execution attributes Show last_execution attributes object
-
reason string
-
last_successful_execution object
Additional properties are allowed.
Hide last_successful_execution attributes Show last_successful_execution attributes object
-
reason string
-
-
-
-