From 37ccd6c8fd8fdb1e669661397d2895ab0f40d97e Mon Sep 17 00:00:00 2001 From: Samuel Macleod Date: Tue, 17 Dec 2024 16:40:14 +0000 Subject: [PATCH] Document new options for kv bulk delete --- src/content/partials/workers/wrangler-commands/kv.mdx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/content/partials/workers/wrangler-commands/kv.mdx b/src/content/partials/workers/wrangler-commands/kv.mdx index 57c116f170f4ad9..889e6a70d26d601 100644 --- a/src/content/partials/workers/wrangler-commands/kv.mdx +++ b/src/content/partials/workers/wrangler-commands/kv.mdx @@ -497,7 +497,7 @@ This command requires `--binding` or `--namespace-id`. -This command takes a JSON file as an argument containing an array of keys to delete. +This command takes a JSON file as an argument containing the keys to delete. The following is an example of the JSON input: @@ -505,6 +505,12 @@ The following is an example of the JSON input: ["test_key_1", "test_key_2"] ``` +The command also accepts keys in the format output from `wrangler kv key list`: + +```json +[{ "name": "test_key_1" }, { "name": "test_key_2" }] +``` + The following is an example of deleting all the keys found in the `allthethingsdelete.json` file. ```sh