Skip to content
v0.5.1GitHub

Using

Counts live keys in the domain, optionally filtered by a prefix — the same semantics as `GET …/keys?prefix=`, without transferring the keys themselves.

applies to v0.5.1
GET
/store-api/kv/{domain}/count
curl --request GET \
--url https://example.com/store-api/kv/example/count \
--header 'Authorization: Bearer <token>'
domain
required
string

Domain name

prefix
string

Key prefix filter

Number of live keys matching the prefix. A full key scan under the hood (same cost as the equivalent keys?prefix= call) — cost grows linearly with domain size, so this is meant for on-demand use, not high-frequency polling.

Media typeapplication/json

Generic {"count": N} response, shared by JSON’s count_documents, KV’s count_keys, and rel’s count_rows — one schema instead of three identical ones.

object
count
required
integer format: int64

Example generated

{
"count": 1
}

Domain is being deleted

Media typetext/plain
string

Rate limit exceeded

Media typetext/plain
string
Retry-After
integer format: int64