Search + K

Command Palette

Search for a command to run...

Sign In

Read the metadata for a key

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

Returns the metadata associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, :, !, %) in the key name.

Parameters

path Path Parameters

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

Responses

200 application/json

Read the metadata for a key response.

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

Client Errors

4XX application/json

Read the metadata for a key response failure.

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