get-watch.asciidoc 1001 B

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