KV

DeleteRange deletes the given range from the key-value store. A delete request increments the revision of the key-value store and generates a delete event in the event history for every deleted key.

post/v3/kv/deleterange

Request

Request body

keystring byte

key is the first key to delete in the range.

prev_kvboolean

If prev_kv is set, etcd gets the previous key-value pairs before deleting it. The previous key-value pairs will be returned in the delete response.

range_endstring byte

range_end is the key following the last key to delete for the range [key, range_end). If range_end is not given, the range is defined to contain only the key argument. If range_end is one bit larger than the given key, then the range is all the keys with the prefix (the given key). If range_end is '\0', the range is all keys greater than or equal to the key argument.

Response

A successful response.

deletedstring int64

deleted is the number of keys deleted by the delete range request.

Changes

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