Count docs with Legacy QL
Count 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.
This is a legacy endpoint that uses the Legacy Query Language.
To use DQL, the current Ditto query language, consider using the execute endpoint.
Authorizations
Authentication using either an API key or JWT token in the Authorization header
Headers
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.
Body
Request parameters for counting documents in a collection. Use this to get the total number of documents matching specific criteria.
Response
Response from a count operation, providing both the count and transaction ID for consistency tracking.