Skip to content

Distinct in Collection​

POST
/mongodb/collections/{collectionName}/distinct/{field}

Distinct for Field in a 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
field*

The field for your distinct Request.

Type
string
Required

Query Parameters

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
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"
extendedJson

plain (default) or relaxed / canonical (2.1.0): the values as MongoDB Extended JSON, so ObjectIds, dates, decimals and integers beyond 2^53 keep their types ({"$numberLong": ...} instead of a bare number that JavaScript rounds)

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

Responses​

application/json
JSON
[
]

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI

Released under the MIT License.