Reference · Platform methods
pub.techne.draft.query.countRecords
query · GETIn the SDK, countRecords
How many records a pub.techne.draft.query names, up to 1000.
It counts what listRecords would answer you for the same query, each record once. The query's order, limit and signals are ignored. Anyone may call it. Signed out, you count public records only.
Input query parameters
| Name | Type | What it is |
|---|---|---|
query | string | A pub.techne.draft.query object, as JSON, up to 16384 characters. Give this or queryUri. |
queryUri | at-uri | A published pub.techne.draft.query record to run. Give this or query. |
params | string | The query's parameters as a JSON object of strings (or lists of strings), up to 8192 characters. $viewer and $now are the platform's and cannot be passed. |
groupBy | string | type or author. It counts per type or per author instead of in all. |
Output application/json
| Name | Type | What it is |
|---|---|---|
countrequired | integer | Records counted, at most 1000. |
cappedrequired | boolean | True when the count stopped at 1000. |
groups | group[] | { key, count } per type or author, largest first. Only with groupBy. |
Errors InvalidRequest (400, a malformed or refused query or parameter) and NotFound (404, queryUri names no query record you may read). The full lexicon is at countRecords.query.draft.techne.pub.
A count with the page
That asks listRecords for count and capped. For a count alone, or by type or author, call this method.
By author
listRecords and countRecords take a reader. A reader is any function that sends a GET for an NSID and answers its JSON.
Places within 5 km, per author
What comes back