Query Arguments

Objects can be queried using the available query arguments, allowing developers to easily search large amounts using the API.

Query arguments are applied in the following order: where, sort, skip, limit

Query Arguments

Name

Description

Example

where

Accepts A JSON object containing operators and expressions used to limit the search results.

where={"$and": [{"created": {"$gt": "2015-01-01T00:00:00.000Z"}}, {"created": {"$lt": "2015-06-01T00:00:00.000Z"}}]}

sort

Used to sort results, can be an indexed property name or a named grouping (when group is used). Also accepts a JSON object containing one or more properties, the values of which must be 1 for ascending and -1 for descending.

sort=posts or sort={"posts": 1, "_id": 1}

skip

An integer representing the number of results to skip. Useful for paging where mapping or groupings have been applied, or where search the search criteria cannot be paged using unique fields.

skip=100

limit

An integer representing the number of results to return.

limit=20