KV

Range gets the keys in the range from the key-value store.

post/v3/kv/range

Request

Request body

count_onlyboolean

count_only when set returns only the count of the keys in the range.

keystring byte

key is the first key for the range. If range_end is not given, the request only looks up key.

keys_onlyboolean

keys_only when set returns only the keys and not the values.

limitstring int64

limit is a limit on the number of keys returned for the request. When limit is set to 0, it is treated as no limit.

max_create_revisionstring int64

max_create_revision is the upper bound for returned key create revisions; all keys with greater create revisions will be filtered away.

max_mod_revisionstring int64

max_mod_revision is the upper bound for returned key mod revisions; all keys with greater mod revisions will be filtered away.

min_create_revisionstring int64

min_create_revision is the lower bound for returned key create revisions; all keys with lesser create revisions will be filtered away.

min_mod_revisionstring int64

min_mod_revision is the lower bound for returned key mod revisions; all keys with lesser mod revisions will be filtered away.

range_endstring byte

range_end is the upper bound on the requested range [key, range_end). If range_end is '\0', the range is all keys >= key. If range_end is key plus one (e.g., "aa"+1 == "ab", "a\xff"+1 == "b"), then the range request gets all keys prefixed with key. If both key and range_end are '\0', then the range request returns all keys.

revisionstring int64

revision is the point-in-time of the key-value store to use for the range. If revision is less or equal to zero, the range is over the newest key-value store. If the revision has been compacted, ErrCompacted is returned as a response.

serializableboolean

serializable sets the range request to use serializable member-local reads. Range requests are linearizable by default; linearizable requests have higher latency and lower throughput than serializable requests but reflect the current consensus of the cluster. For better performance, in exchange for possible stale reads, a serializable range request is served locally without needing to reach consensus with other nodes in the cluster.

sort_order'NONE' | 'ASCEND' | 'DESCEND'
sort_target'KEY' | 'VERSION' | 'CREATE' | 'MOD' | 'VALUE'

Response

A successful response.

countstring int64

count is set to the number of keys within the range when requested.

moreboolean

more indicates if there are more keys to return in the requested range.

Changes

No recorded changes to this operation across all 1 revision of this API.