v1
latestOpenAPI 3.0.32026-07-2652928.6 KBCount the number of documents in a collection that match a specified query. This endpoint is useful for pagination, analytics, and understanding the size of your dataset.
post/store/count
Headers
X-DITTO-TXN-IDinteger
Optional transaction ID header that ensures consistency. If specified, the operation will only proceed if the Big Peer's transaction ID is equal to or greater than this value. This prevents reading stale data by ensuring you're operating on a sufficiently up-to-date version of the database.
Request body
Example request
{
"collection": "people",
"query": "favoriteBook.title == 'The Great Gatsby'"
}Response
The count operation completed successfully. Returns the total number of matching documents and the transaction ID of the operation.
Example response
{
"count": 100,
"txnId": 9000
}