cloudflare / cloudflare/workers-sdk

Local Explorer should implement the production KV bulk write and delete endpoints

Closed
#15,474 1 comment 0 reactions 0 assignees View on GitHub
feature:local-explorer product:kv
Dominant language
TypeScript
Stars
4.5k
Forks
1.5k
Avg merge
3d 8h
Merged PRs (30d)
186

Description

### Description

Local Explorer implements individual KV operations and the bulk-get endpoint, but omits the production-compatible bulk write and bulk delete routes.

Implemented locally:

- GET /storage/kv/namespaces/{namespace_id}/keys
- GET, PUT, and DELETE /storage/kv/namespaces/{namespace_id}/values/{key_name}
- POST /storage/kv/namespaces/{namespace_id}/bulk/get

Missing locally:

- PUT /storage/kv/namespaces/{namespace_id}/bulk
- POST /storage/kv/namespaces/{namespace_id}/bulk/delete

Both missing routes are production Workers KV API endpoints. A client that switches the API base URL to Local Explorer receives an unmatched-route response even though the same method, path, and body are valid against production.

### Reproduction

Start Miniflare with Local Explorer enabled, then send either production-compatible request:

PUT /cdn-cgi/local/explorer/api/storage/kv/namespaces/test-namespace/bulk
Content-Type: application/json

[{ "key": "hello", "value": "world" }]

or:

POST /cdn-cgi/local/explorer/api/storage/kv/namespaces/test-namespace/bulk/delete
Content-Type: application/json

["hello"]

Both routes are currently absent. Bulk get against the same namespace is implemented.

Observed with the current pkg-pr Miniflare build used by cf: https://pkg.pr.new/miniflare@15401.

### Expected behavior

Local Explorer should expose both production endpoints with production-compatible request and response shapes. This should include the supported KV bulk value forms, such as text values, base64-encoded values, expiration fields, metadata, and the accepted bulk-delete key representation.

This enables API clients to use local KV by rewriting only the API base URL/account prefix, consistent with the other Local Explorer KV routes.

Contributor guide

Open the contributing guide

Research direction

Start by locating Local Explorer's existing bulk-get route and the Miniflare Local Explorer KV implementation. Compare the production-compatible request and response shapes for bulk write and bulk delete, including text, base64, expiration, metadata, and key forms. Done means both listed routes accept those supported forms and match production behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.