mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
HLRC: Add get watch API (#35531)
This changes adds the support for the get watch API in the high level rest client.
This commit is contained in:
parent
fa3d365ee8
commit
5c7b2c5f9b
15 changed files with 676 additions and 15 deletions
|
@ -422,6 +422,7 @@ The Java High Level REST Client supports the following Watcher APIs:
|
|||
* <<{upid}-start-watch-service>>
|
||||
* <<{upid}-stop-watch-service>>
|
||||
* <<java-rest-high-x-pack-watcher-put-watch>>
|
||||
* <<java-rest-high-x-pack-watcher-get-watch>>
|
||||
* <<java-rest-high-x-pack-watcher-delete-watch>>
|
||||
* <<java-rest-high-watcher-deactivate-watch>>
|
||||
* <<{upid}-ack-watch>>
|
||||
|
@ -431,6 +432,7 @@ The Java High Level REST Client supports the following Watcher APIs:
|
|||
include::watcher/start-watch-service.asciidoc[]
|
||||
include::watcher/stop-watch-service.asciidoc[]
|
||||
include::watcher/put-watch.asciidoc[]
|
||||
include::watcher/get-watch.asciidoc[]
|
||||
include::watcher/delete-watch.asciidoc[]
|
||||
include::watcher/ack-watch.asciidoc[]
|
||||
include::watcher/deactivate-watch.asciidoc[]
|
||||
|
|
36
docs/java-rest/high-level/watcher/get-watch.asciidoc
Normal file
36
docs/java-rest/high-level/watcher/get-watch.asciidoc
Normal file
|
@ -0,0 +1,36 @@
|
|||
--
|
||||
:api: get-watch
|
||||
:request: GetWatchRequest
|
||||
:response: GetWatchResponse
|
||||
--
|
||||
|
||||
[id="{upid}-{api}"]
|
||||
=== Get Watch API
|
||||
|
||||
[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
|
||||
<2> `_version` returns the version of the watch
|
||||
<3> `status` contains status of the watch
|
||||
<4> `source` the source of the watch
|
||||
|
||||
include::../execution.asciidoc[]
|
Loading…
Add table
Add a link
Reference in a new issue