| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 | [role="xpack"][[get-global-checkpoints]]=== Get global checkpoints API++++<titleabbrev>Get global checkpoints</titleabbrev>++++The purpose of the get global checkpoints api is to return the current globalcheckpoints for an index. This API allows users to know the what sequence numbershave been safely persisted in Elasticsearch.[discrete][[polling-on-global-checkpoint]]== Polling on global checkpoint advanceThe API has an optional polling mode enabled by the `wait_for_advance` queryparameter. In polling mode, the API will only return after the global checkpointsadvance past the provided `checkpoints`. By default, `checkpoints` is an emptyarray, which will lead to the API returning immediately.If a timeout occurs before the global checkpoints advance past the provided`checkpoints`, Elasticsearch will return the current global checkpoints and aboolean indicating that the request timed out.Currently the `wait_for_advance` parameter is only supported for one shard indices.[discrete][[polling-on-index]]== Polling on index readyBy default in polling mode, an exception will be returned if the index does notexist or all the primary shards are not active. In polling mode, the`wait_for_index` parameter can be used to modify this behavior. If `wait_for_index`is set to true, the API will wait for the index to be created and all primaryshards to be active.If a timeout occurs before these conditions are met, the relevant exception will bereturned.Currently the `wait_for_index` parameter is only supported when `wait_for_advance`is true.[[get-global-checkpoints-api-request]]==== {api-request-title}`GET /<index>/_fleet/global_checkpoints`[[get-global-checkpoints-api-path-params]]==== {api-path-parms-title}`<index>`::(Required, string)A single index or index alias that resolves to a single index.[role="child_attributes"][[get-global-checkpoints-api-query-parms]]==== {api-query-parms-title}`wait_for_advance`::(Optional, Boolean) A boolean value which controls whether to wait (until the`timeout`) for the global checkpoints to advance past the provided`checkpoints`. Defaults to `false`.`wait_for_index`::(Optional, Boolean) A boolean value which controls whether to wait (until the`timeout`) for the target index to exist and all primary shards be active. Canonly be `true` when `wait_for_advance` is `true`. Defaults to `false`.`checkpoints`::(Optional, list) A comma separated list of previous global checkpoints.When used in combination with `wait_for_advance`, the API will only return oncethe global checkpoints advances past the `checkpoints`. Defaults to an empty listwhich will cause Elasticsearch to immediately return the current globalcheckpoints.`timeout`::(Optional, <<time-units, time units>>)Period to wait for a global checkpoints to advance past `checkpoints`.Defaults to `30s`.[role="child_attributes"][[get-global-checkpoints-api-response-body]]==== {api-response-body-title}`global_checkpoints`::(array of integers) The global checkpoints for the index.`timed_out`::(Boolean) If `false` the global checkpoints did not advance past the`checkpoints` within the specified `timeout`.
 |