WorkerWorkers Kv Namespace

Read the metadata for a key

GET

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.

Path parameters

key_namestringRequired
A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.
namespace_identifierstringRequired
Namespace identifier tag.
account_identifierstringRequired
Identifier

Response

This endpoint returns an object
result
map from strings to anyOptional
Arbitrary JSON that is associated with a key.
GET
1curl https://api.cloudflare.com/client/v4/accounts/023e105f4ecef8ad9ca31a8372d0c353/storage/kv/namespaces/0f2ac74b498b48028cb68387c421e279/metadata/My-Key \
2 -H "Authorization: Bearer <token>"
200Retrieved
1{}