Using
Counts all documents of a domain (key scan only).
applies to v0.5.1GET
/store-api/json/{domain}/documents/count
const url = 'https://example.com/store-api/json/example/documents/count';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/json/example/documents/count \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”domain
required
string
JSON domain
Responses
Section titled “Responses”Document count
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 not found
Media typetext/plain
string
Domain is being deleted
Media typetext/plain
string
JSON engine disabled
Media typetext/plain
string