Find Documents

Find multiple documents that match a query.

post/action/find

Request

  • Base URL
    https://data.mongodb-api.com/app/your-app-id/endpoint/data/v1
  • URL
    https://data.mongodb-api.com/app/your-app-id/endpoint/data/v1/action/find
  • Auth
    • API key in header Authorization
    • or API key in header email and API key in header password
    • or API key in header apiKey
    • or API key in header jwtTokenString

Request body

dataSourcestring required

The name of a linked MongoDB Atlas data source. This is commonly "mongodb-atlas" though it may be different in your App if you chose a different name when you created the data source.

databasestring required

The name of a database in the specified data source.

collectionstring required

The name of a collection in the specified database.

filterobject required

A MongoDB query filter that matches documents. For a list of all query operators that the Data API supports, see Query Operators.

projectionobject

A MongoDB projection for matched documents returned by the operation.

sortobject

A MongoDB sort expression that indicates sorted field names and directions.

limitnumber

The maximum number of matching documents to include the in the response.

skipnumber

The number of matching documents to omit from the response.

Response

Found

documentsobject[]

A list of documents that match the specified filter.

Changes

No recorded changes to this operation across all 3 revisions of this API.