Read key-value pair
GET
/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name} https://api.cloudflare.com/client/v4
Returns the value associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, :, !, %) in the key name. If the KV-pair is set to expire at some point, the expiration time as measured in seconds since the UNIX epoch will be returned in the expiration response header.
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/octet-stream
Read key-value pair response.
type WorkersKvValue = string
Client Errors
4XX application/json
Read key-value pair response failure.
interface WorkersKvApiResponseCommonFailure {
errors:WorkersKvMessages ;
messages:WorkersKvMessages ;
result: {} | null;
success: false;
}
errors:
messages:
result: {} | null;
success: false;
}