Responses
-
Hide response attributes Show response attributes object
-
Hide status attributes Show status attributes object
-
Hide actions attribute Show actions attribute object
-
Hide * attributes Show * attributes object
-
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.
-
Hide state attributes Show state attributes object
-
-
Hide watch attributes Show watch attributes object
-
Hide actions attribute Show actions attribute object
-
Hide * attributes Show * attributes object
-
Values are
email
,webhook
,index
,logging
,slack
, orpagerduty
. -
Hide condition attributes Show condition attributes object
-
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. -
Time unit for milliseconds
-
Hide transform attributes Show transform attributes object
-
-
Hide index attributes Show index attributes object
-
Values are
true
,false
, orwait_for
. -
Values are
index
orcreate
. -
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. -
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
Hide webhook attributes Show webhook attributes object
-
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. -
Values are
head
,get
,post
,put
, ordelete
. -
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. -
Values are
http
orhttps
.
-
-
-
Hide condition attributes Show condition attributes object
-
Hide input attributes Show input attributes object
-
Hide http attributes Show http attributes object
-
Hide request attributes Show request attributes object
-
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. -
Values are
head
,get
,post
,put
, ordelete
. -
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. -
Values are
http
orhttps
.
-
Values are
json
,yaml
, ortext
.
-
Hide search attributes Show search attributes object
-
Hide request attributes Show request attributes object
-
Controls how to deal with unavailable concrete indices (closed or missing), how wildcard expressions are expanded to actual indices (all, closed or open indices) and how to deal with wildcard expressions that resolve to no indices.
Hide indices_options attributes Show indices_options attributes object
-
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
. -
If true, missing or closed indices are not included in the response.
Default value is
false
. -
If true, concrete, expanded or aliased indices are ignored when frozen.
Default value is
true
.
-
-
Values are
query_then_fetch
ordfs_query_then_fetch
. -
Hide template attributes Show template attributes object
-
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.
-
Hide status attributes Show status attributes object
-
Hide actions attribute Show actions attribute object
-
Hide * attributes Show * attributes object
-
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.
-
Hide state attributes Show state attributes object
-
-
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. -
Time unit for milliseconds
-
Hide transform attributes Show transform attributes object
-
-
Hide search attributes Show search attributes object
-
Hide request attributes Show request attributes object
-
Controls how to deal with unavailable concrete indices (closed or missing), how wildcard expressions are expanded to actual indices (all, closed or open indices) and how to deal with wildcard expressions that resolve to no indices.
Hide indices_options attributes Show indices_options attributes object
-
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
. -
If true, missing or closed indices are not included in the response.
Default value is
false
. -
If true, concrete, expanded or aliased indices are ignored when frozen.
Default value is
true
.
-
-
Values are
query_then_fetch
ordfs_query_then_fetch
. -
Hide template attributes Show template attributes object
-
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.
-
-
-
Hide trigger attribute Show trigger attribute object
-
Hide schedule attributes Show schedule attributes object
-
-
GET _watcher/watch/my_watch
resp = client.watcher.get_watch( id="my_watch", )
const response = await client.watcher.getWatch({ id: "my_watch", });
response = client.watcher.get_watch( id: "my_watch" )
$resp = $client->watcher()->getWatch([ "id" => "my_watch", ]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_watcher/watch/my_watch"
{ "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" } } } } }