get-global-checkpoints.asciidoc 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. [role="xpack"]
  2. [[get-global-checkpoints]]
  3. === Get global checkpoints API
  4. ++++
  5. <titleabbrev>Get global checkpoints</titleabbrev>
  6. ++++
  7. The purpose of the get global checkpoints api is to return the current global
  8. checkpoints for an index. This API allows users to know the what sequence numbers
  9. have been safely persisted in Elasticsearch.
  10. The API has an optional polling mode enabled by the `wait_for_advance` query
  11. parameter. In polling mode, the API will only return after the global checkpoints
  12. advance past the provided `checkpoints`. By default, `checkpoints` is an empty
  13. array, which will lead to the API returning immediately.
  14. If a timeout occurs before the global checkpoints advance past the provided
  15. `checkpoints`, Elasticsearch will return the current global checkpoints and a
  16. boolean indicating that the request timed out.
  17. Currently the `wait_for_advance` parameter is only supported for one shard indices.
  18. [[get-global-checkpoints-api-request]]
  19. ==== {api-request-title}
  20. `GET /<index>/_fleet/global_checkpoints`
  21. [[get-global-checkpoints-api-path-params]]
  22. ==== {api-path-parms-title}
  23. `<index>`::
  24. (Required, string)
  25. A single index or index alias that resolves to a single index.
  26. [role="child_attributes"]
  27. [[get-global-checkpoints-api-query-parms]]
  28. ==== {api-query-parms-title}
  29. `wait_for_advance`::
  30. (Optional, Boolean) A boolean value which controls whether to wait (until the
  31. `timeout`) for the global checkpoints to advance past the provided
  32. `checkpoints`.
  33. `checkpoints`::
  34. (Optional, list) A comma separated list of previous global checkpoints.
  35. When used in combination with `wait_for_advance`, the API will only return once
  36. the global checkpoints advances past the `checkpoints`. Defaults to an empty list
  37. which will cause Elasticsearch to immediately return the current global
  38. checkpoints.
  39. `timeout`::
  40. (Optional, <<time-units, time units>>)
  41. Period to wait for a global checkpoints to advance past `checkpoints`.
  42. Defaults to `30s`.
  43. [role="child_attributes"]
  44. [[get-global-checkpoints-api-response-body]]
  45. ==== {api-response-body-title}
  46. `global_checkpoints`::
  47. (array of integers) The global checkpoints for the index.
  48. `timed_out`::
  49. (Boolean) If `false` the global checkpoints did not advance past the
  50. `checkpoints` within the specified `timeout`.