Search + K

Command Palette

Search for a command to run...

Sign In

List a Namespace's Keys

GET /accounts/{account_id}/storage/kv/namespaces/{namespace_id}/keys
Copy endpoint
https://api.cloudflare.com/client/v4

Lists a namespace's keys.

Parameters

path Path Parameters

Name Type
namespace_id required
type WorkersKvNamespaceIdentifier = string
account_id required
type WorkersKvIdentifier = string

query Query Parameters

Name Type
limit
number
prefix
string
cursor
string

Responses

200 application/json

List a Namespace's Keys response.

interface WorkersKvApiResponseCommon {
errors: WorkersKvMessages
type WorkersKvMessages = { code: number;message: string; }[]
;
messages: WorkersKvMessages
type WorkersKvMessages = { code: number;message: string; }[]
;
success: true;
}
& { result?: WorkersKvKey

A name for a value. A value stored under a given key may be retrieved via the same key.

interface WorkersKvKey {
expiration?: number;
metadata?: WorkersKvListMetadata;
name: WorkersKvKeyName;
}
[]
;result_info?: { count?: number;cursor?: WorkersKvCursor

Opaque token indicating the position from which to continue when requesting the next set of records if the amount of list results was limited by the limit parameter. A valid value for the cursor can be obtained from the cursors object in the result_info structure.

type WorkersKvCursor = string
; }
; }

Client Errors

4XX application/json

List a Namespace's Keys response failure.

interface WorkersKvApiResponseCommonFailure {
errors: WorkersKvMessages
type WorkersKvMessages = { code: number;message: string; }[]
;
messages: WorkersKvMessages
type WorkersKvMessages = { code: number;message: string; }[]
;
result: {} | null;
success: false;
}