Skip to main content

Count

Count Documents

This entrypoint returns the count of documents that the requester is allowed to read.

  • GET /{base_url}/count

Example

request

curl \
-X GET \
-H "Accept: application/json" \
https://example.com/users/count

response

Status: 200
3

Count Documents - Advanced

This entrypoint returns the count of documents that would match a query for the collection.

  • POST /{base_url}/count

Parameters

NameTypeInDescriptionDefault
filterobjectbodyMongoose Filter object
access'list' | 'read'bodyThe access levellist

Example

request

curl \
-X POST \
-H "Accept: application/json" \
https://example.com/users/count \
-d '{
"filter": {
"name": { "$regex": "drew", "$options": "i" }
},
"access": "list"
}'

response

Status: 200
2