get-watch.asciidoc 987 B

123456789101112131415161718192021222324252627282930313233343536
  1. --
  2. :api: get-watch
  3. :request: GetWatchRequest
  4. :response: GetWatchResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Get Watch API
  8. [id="{upid}-{api}-request"]
  9. ==== Execution
  10. A watch can be retrieved as follows:
  11. ["source","java",subs="attributes,callouts,macros"]
  12. --------------------------------------------------
  13. include-tagged::{doc-tests-file}[{api}-request]
  14. --------------------------------------------------
  15. [id="{upid}-{api}-response"]
  16. ==== Response
  17. The returned +{response}+ contains `id`, `version`, `status` and `source`
  18. information.
  19. ["source","java",subs="attributes,callouts,macros"]
  20. --------------------------------------------------
  21. include-tagged::{doc-tests-file}[{api}-response]
  22. --------------------------------------------------
  23. <1> `_id`, id of the watch
  24. <2> `found` is a boolean indicating whether the watch was found
  25. <3> `_version` returns the version of the watch
  26. <4> `status` contains status of the watch
  27. <5> `source` the source of the watch
  28. include::../execution.asciidoc[]