2018-11-30 05:02:46 -05:00
|
|
|
--
|
|
|
|
:api: get-watch
|
|
|
|
:request: GetWatchRequest
|
|
|
|
:response: GetWatchResponse
|
|
|
|
--
|
2019-09-11 19:32:47 -04:00
|
|
|
[role="xpack"]
|
2018-11-30 05:02:46 -05:00
|
|
|
[id="{upid}-{api}"]
|
2019-09-04 20:03:05 -04:00
|
|
|
=== Get watch API
|
2018-11-30 05:02:46 -05:00
|
|
|
|
|
|
|
[id="{upid}-{api}-request"]
|
|
|
|
==== Execution
|
|
|
|
|
|
|
|
A watch can be retrieved as follows:
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
|
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
[id="{upid}-{api}-response"]
|
|
|
|
==== Response
|
|
|
|
|
|
|
|
The returned +{response}+ contains `id`, `version`, `status` and `source`
|
|
|
|
information.
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
|
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
|
|
|
--------------------------------------------------
|
|
|
|
<1> `_id`, id of the watch
|
|
|
|
<2> `found` is a boolean indicating whether the watch was found
|
2018-11-30 06:53:04 -05:00
|
|
|
<3> `_version` returns the version of the watch
|
|
|
|
<4> `status` contains status of the watch
|
|
|
|
<5> `source` the source of the watch
|
2018-11-30 05:02:46 -05:00
|
|
|
|
|
|
|
include::../execution.asciidoc[]
|