Using
Counts the rows of `table` — the same residual-free access path `SELECT COUNT(*) FROM table` would use via `/sql`, without a SQL round trip. A view answers 404 here, same as `GET …/rows` (no row-level resource in v1).
applies to v0.5.1GET
/store-api/rel/{domain}/tables/{table}/count
const url = 'https://example.com/store-api/rel/example/tables/example/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/rel/example/tables/example/count \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”domain
required
string
Relational domain
table
required
string
Table name
Responses
Section titled “Responses”Row count. A full key scan under the hood — cost grows linearly with table size; 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 or table not found (a view has no count resource, same as rows)
Media typetext/plain
string
Domain is being deleted
Media typetext/plain
string
Per-domain request budget exceeded
Media typetext/plain
string
Relational engine disabled
Media typetext/plain
string