Using
Retrieves the raw byte value for a key. Returns 204 for a key in the null state and 404 if the key does not exist or has expired. When the key has a TTL, the response carries an `X-Expires-At` header with the absolute Unix-seconds expiry. 200 and 204 carry an `ETag` identifying the version read, for a later conditional write.
applies to v0.5.1GET
/store-api/kv/{domain}/keys/{key}
const url = 'https://example.com/store-api/kv/example/keys/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/store-api/kv/example/keys/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”domain
required
string
Domain name
key
required
string
Key (valid UTF-8, max 256 bytes)
Responses
Section titled “Responses”Value (raw bytes; an empty value yields an empty body). The X-Expires-At header (absolute Unix seconds) is present only when the key has a TTL.
Media typeapplication/octet-stream
Headers
Section titled “Headers”ETag
string
Strong, opaque version tag for If-Match / If-None-Match
X-Expires-At
integer format: int64
Key exists in the explicit null state (set via PATCH …/null)
Headers
Section titled “Headers”ETag
string
Strong, opaque version tag for If-Match / If-None-Match
Invalid key
Media typetext/plain
string
Key or domain not found
Media typetext/plain
string
Domain is being deleted
Media typetext/plain
string
Rate limit exceeded
Media typetext/plain
string
Headers
Section titled “Headers”Retry-After
integer format: int64