get-model-snapshots.asciidoc 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. --
  2. :api: get-model-snapshots
  3. :request: GetModelSnapshotsRequest
  4. :response: GetModelSnapshotsResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Get model snapshots API
  9. Retrieves one or more model snapshot results.
  10. It accepts a +{request}+ object and responds with a +{response}+ object.
  11. [id="{upid}-{api}-request"]
  12. ==== Get model snapshots request
  13. A +{request}+ object gets created with an existing non-null `jobId`.
  14. ["source","java",subs="attributes,callouts,macros"]
  15. --------------------------------------------------
  16. include-tagged::{doc-tests-file}[{api}-request]
  17. --------------------------------------------------
  18. <1> Constructing a new request referencing an existing `jobId`.
  19. ==== Optional arguments
  20. The following arguments are optional:
  21. ["source","java",subs="attributes,callouts,macros"]
  22. --------------------------------------------------
  23. include-tagged::{doc-tests-file}[{api}-snapshot-id]
  24. --------------------------------------------------
  25. <1> The ID of the snapshot to get. Otherwise, it will return all snapshots.
  26. ["source","java",subs="attributes,callouts,macros"]
  27. --------------------------------------------------
  28. include-tagged::{doc-tests-file}[{api}-desc]
  29. --------------------------------------------------
  30. <1> If `true`, the snapshots are sorted in descending order. Defaults to `false`.
  31. ["source","java",subs="attributes,callouts,macros"]
  32. --------------------------------------------------
  33. include-tagged::{doc-tests-file}[{api}-end]
  34. --------------------------------------------------
  35. <1> Snapshots with timestamps earlier than this time will be returned.
  36. ["source","java",subs="attributes,callouts,macros"]
  37. --------------------------------------------------
  38. include-tagged::{doc-tests-file}[{api}-sort]
  39. --------------------------------------------------
  40. <1> The field to sort snapshots on. Defaults to `timestamp`.
  41. ["source","java",subs="attributes,callouts,macros"]
  42. --------------------------------------------------
  43. include-tagged::{doc-tests-file}[{api}-start]
  44. --------------------------------------------------
  45. <1> Snapshots with timestamps on or after this time will be returned.
  46. ["source","java",subs="attributes,callouts,macros"]
  47. --------------------------------------------------
  48. include-tagged::{doc-tests-file}[{api}-page]
  49. --------------------------------------------------
  50. <1> The page parameters `from` and `size`. `from` specifies the number of
  51. snapshots to skip. `size` specifies the maximum number of snapshots to retrieve.
  52. Defaults to `0` and `100` respectively.
  53. include::../execution.asciidoc[]
  54. [id="{upid}-{api}-response"]
  55. ==== Get model snapshots response
  56. The returned +{response}+ contains the requested snapshots:
  57. ["source","java",subs="attributes,callouts,macros"]
  58. --------------------------------------------------
  59. include-tagged::{doc-tests-file}[{api}-response]
  60. --------------------------------------------------
  61. <1> The count of snapshots that were matched.
  62. <2> The snapshots retrieved.