Path parameters
-
id
string Required The watch identifier.
Responses
-
200 application/json
Hide response attributes Show response attributes object
-
found
boolean Required -
_id
string Required -
status
object 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 -
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
-
-
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
-
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 -
execution_state
string
-
-
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
-
action_type
string Values are
email
,webhook
,index
,logging
,slack
, orpagerduty
. -
condition
object Hide condition attributes Show condition attributes object
-
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 Hide transform attributes Show transform attributes object
-
index
object Hide index attributes Show index attributes object
-
index
string Required -
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 -
email
object -
pagerduty
object Hide pagerduty attributes Show pagerduty attributes object
-
account
string -
attach_payload
boolean Required -
client
string -
client_url
string -
contexts
array[object] -
description
string Required -
event_type
string Values are
trigger
,resolve
, oracknowledge
. -
incident_key
string Required -
proxy
object
-
-
slack
object Hide slack attributes Show slack attributes object
-
account
string -
message
object Required Hide message attributes Show message attributes object
-
attachments
array[object] Required -
dynamic_attachments
object -
from
string Required -
icon
string -
text
string Required -
to
array[string] Required
-
-
-
webhook
object Hide webhook attributes Show webhook attributes object
-
auth
object -
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 -
host
string -
method
string Values are
head
,get
,post
,put
, ordelete
. -
params
object -
path
string -
port
number -
proxy
object -
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
-
-
-
-
condition
object Required -
input
object Required Hide input attributes Show input attributes object
-
chain
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
-
basic
object Required
-
-
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
-
*
string Additional properties
-
-
host
string -
method
string Values are
head
,get
,post
,put
, ordelete
. -
params
object Hide params attribute Show params attribute object
-
*
string Additional properties
-
-
path
string -
port
number -
proxy
object -
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 Hide search attributes Show search attributes object
-
extract
array[string] -
request
object Required Hide request attributes Show request attributes object
-
body
object Hide body attribute Show body attribute object
-
query
object Required An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
-
-
indices
array[string] -
indices_options
object 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 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
-
*
object Additional properties
-
-
-
metadata
object Hide metadata attribute Show metadata attribute object
-
*
object Additional properties
-
-
status
object 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 -
last_execution
object Hide last_execution attributes Show last_execution attributes object
-
successful
boolean Required -
reason
string
-
-
last_successful_execution
object Hide last_successful_execution attributes Show last_successful_execution attributes object
-
successful
boolean Required -
reason
string
-
-
last_throttle
object
-
-
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
-
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 -
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 Hide transform attributes Show transform attributes object
-
chain
array[object] -
script
object Hide script attributes Show script attributes object
-
search
object Hide search attributes Show search attributes object
-
request
object Required Hide request attributes Show request attributes object
-
body
object Hide body attribute Show body attribute object
-
query
object Required An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
-
-
indices
array[string] -
indices_options
object 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 Hide template attributes Show template attributes object
-
rest_total_hits_as_int
boolean
-
-
timeout
string Required 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.
-
-
-
trigger
object Required Hide trigger attribute Show trigger attribute object
-
schedule
object Hide schedule attributes Show schedule attributes object
-
timezone
string -
cron
string -
daily
object Hide daily attribute Show daily attribute object
-
at
array[string | object] Required A time of day, expressed either as
hh:mm
,noon
,midnight
, or an hour/minutes structure.
-
-
hourly
object Hide hourly attribute Show hourly attribute object
-
minute
array[number] Required
-
-
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.
-
-
-
-
_primary_term
number -
_seq_no
number -
_version
number
-
curl \
--request GET 'http://api.example.com/_watcher/watch/{id}' \
--header "Authorization: $API_KEY"
{
"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"
}
}
}
}
}