This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Counts the number of items in the specified data collection that match the filtering preferences.
ID of the collection to query.
Filter to specify which items to count. See API Query Language for more information about handling data queries.
Whether to retrieve data from the primary database instance. This decreases performance but ensures data retrieved is up-to-date even immediately after an update. Applicable if the external database is eventually consistent.
Number of items that match the query.
curl POST https://external-db.example.com/v3/items/count \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: <AUTH>' \
--d '{
"collectionId": "cities",
"filter": {
"country": "US"
},
"consistentRead": false
}'
{
"totalCount": 42
}