Skip to content

Documents in Collection​

GET
/mongodb/collections/{collectionName}/documents

Get Documents paginated from given Collection

Authorizations​

httpAuth
Type
HTTP (bearer)
or
httpAuth1
Type
HTTP (basic)
or
apiKeyAuth
Type
API Key (header: X-AUTH-APIKEY)

Parameters​

Path Parameters

collectionName*

The name of your MongoDb Collection

Type
string
Required

Query Parameters

q

Full-text search (2.10.0, collections declared with search): the words; the best matches first unless sort is given. 400 for a collection without search.

Type
string
expand

References to expand (2.4.0): declared ref fields of the collection, repeated or comma separated, at most 5. Each becomes the referenced document, read with the grant and the read scope of its collection (null, or left out of an array, when the caller cannot read it). 400 for a field that is no reference.

Type
array
withDeleted

Soft-deleted documents too (collections declared with softDelete, 2.3.0); needs the administrate grant of the collection, 403 otherwise.

Type
boolean
Default
false
drafts

The working copies (2.11.0, collections declared with drafts), also of documents that were never published; needs the write grant (and drafts.readers or the update rule), 403 otherwise.

Type
boolean
Default
false
filter

MongoDB filter query, all documents by default

Type
string
sort

MongoDB sorting

Type
array
Example
Default
projection

MongoDB projection

Type
array
Example
Default
rowsPerPage

Count elements per page

Type
integer
Example100
Format
"int64"
page

Requested page of the ResultSets

Type
integer
Example1
Format
"int64"
count

How the result is counted: exact (default) or none (no count headers, no count query)

Type
string
Valid values
"exact""none"
Example"exact"
Default
"exact"
after

Cursor paging: the x-pagination-next value of the previous page, empty for the first page. The sort always ends with _id; cannot be combined with page

Type
string
Example""
extendedJson

relaxed (default since 2.0.0) or canonical: the documents as MongoDB Extended JSON with the types of their values ({"$oid": ...}, {"$date": ...}, {"$numberDecimal": ...}; canonical also {"$numberInt": ...}, {"$numberLong": ...} and {"$numberDouble": ...}); a text that looks like a date is {"$string": ...}. plain: the format of 1.x (ids and dates as strings, every number as JSON number, no types).

Type
string
Valid values
"relaxed""canonical""plain"
Default
"relaxed"
filterCaseInsensitive

true: wildcards and prefixes of the Lucene filter ignore the case (the behaviour before 2.0.0). By default they are case-sensitive, so an index on the field serves a prefix like name:abc*

Type
boolean
Examplefalse
Default
false

Responses​

application/json
JSON
[
  
{
  
  
"additionalProperties": null
  
}
]

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI

Released under the MIT License.