MongoDB
Send MongoDB queries with the MongoDB built-in.
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
opts.skip | number | null | How many results to skip. |
opts.limit | number | null | How many results to reurn. |
Field | Type | Description |
---|
output | []object | A list of MongoDB documents. |
Example
1
[{ "_id": "62c4caa466499db2981e496e", "fruit": "apple" }]
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
opts.skip | number | null | How many results to skip. |
opts.limit | number | null | How many results to reurn. |
Field | Type | Description |
---|
output | []object | A list of MongoDB documents. |
Example
1
[{ "_id": "62c4caa466499db2981e496e", "fruit": "apple" }]
Field | Type | Default | Description |
---|
mongo_resource | str | Required | The MongoDB resource. |
collection | str | Required | The MongoDB collection. |
filter | Optional[Dict[str, Any]] | None | Optional filter criteria. Returns all documents if filter is not provided. |
projection | Optional[Dict[str, Any]] | None | Specify which fields to return in the results. |
sort | Optional[Dict[str, Any]] | None | Specify the sort order of results. |
limit | Optional[int] | None | How many results to skip. |
skip | Optional[int] | None | How many results to reurn. |
Field | Type | Description |
---|
output | List[Dict[str, Any]] | A list of MongoDB documents. |
Example
1
[{ "_id": "62c4caa466499db2981e496e", "fruit": "apple" }]
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
Field | Type | Description |
---|
output | object | A MongoDB document. Empty if there were no results. |
Example
1
{ "_id": "62c4caa466499db2981e496e", "fruit": "apple" }
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
Field | Type | Description |
---|
output | object | A MongoDB document. Empty if there were no results. |
Example
1
{ "_id": "62c4caa466499db2981e496e", "fruit": "apple" }
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
collection | str | Required | The MongoDB collection. |
filter | Optional[Dict[str, Any]] | None | Optional filter criteria. Returns all documents if filter is not provided. |
projection | Optional[Dict[str, Any]] | None | Specify which fields to return in the results. |
sort | Optional[Dict[str, Any]] | None | Specify the sort order of results. |
Field | Type | Description |
---|
output | Dict[str, Any] | A MongoDB document. Empty if there were no results. |
Example
1
[{ "_id": "62c4caa466499db2981e496e", "fruit": "apple" }]
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
update | object | Required | The documents to update. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.upsert | boolean | false | Specifies whether to create a new document if one does not exist. |
Field | Type | Description |
---|
output.MatchedCount | number | The number of documents matching the filter. |
output.ModifiedCount | number | The number of documents modified. |
output.UpsertedCount | number | The number of documents upserted. 0 if upsert is false . |
output.UpsertedID | string | null | The _id for the upserted document. null if upsert is false . |
Example
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
update | object | Required | The documents to update. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.upsert | boolean | false | Specifies whether to create a new document if one does not exist. |
Field | Type | Description |
---|
output.MatchedCount | number | The number of documents matching the filter. |
output.ModifiedCount | number | The number of documents modified. |
output.UpsertedCount | number | The number of documents upserted. 0 if upsert is false . |
output.UpsertedID | string | null | The _id for the upserted document. null if upsert is false . |
Example
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
collection | str | Required | The MongoDB collection. |
update | Dict[str, Any] | Required | The documents to update. |
filter | Optional[Dict[str, Any]] | None | Optional filter criteria. Returns all documents if filter is not provided. |
upsert | bool | False | Specifies whether to create a new document if one does not exist. |
Field | Type | Description |
---|
output["MatchedCount"] | float | The number of documents matching the filter. |
output["ModifiedCount"] | float | The number of documents modified. |
output["UpsertedCount"] | float | The number of documents upserted. 0 if upsert is false . |
output["UpsertedID"] | Optional[str] | The _id for the upserted document. null if upsert is false . |
Example
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
update | object | Required | The documents to update. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.upsert | boolean | false | Specifies whether to create a new document if one does not exist. |
Field | Type | Description |
---|
output.MatchedCount | number | The number of documents matching the filter. |
output.ModifiedCount | number | The number of documents modified. |
output.UpsertedCount | number | The number of documents upserted. 0 if upsert is false . |
output.UpsertedID | string | null | The _id for the upserted document. null if upsert is false . |
Example
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
update | object | Required | The documents to update. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.upsert | boolean | false | Specifies whether to create a new document if one does not exist. |
Field | Type | Description |
---|
output.MatchedCount | number | The number of documents matching the filter. |
output.ModifiedCount | number | The number of documents modified. |
output.UpsertedCount | number | The number of documents upserted. 0 if upsert is false . |
output.UpsertedID | string | null | The _id for the upserted document. null if upsert is false . |
Example
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
collection | str | Required | The MongoDB collection. |
update | Dict[str, Any] | Required | The documents to update. |
filter | Optional[Dict[str, Any]] | None | Optional filter criteria. Returns all documents if filter is not provided. |
upsert | bool | False | Specifies whether to create a new document if one does not exist. |
Field | Type | Description |
---|
output["MatchedCount"] | float | The number of documents matching the filter. |
output["ModifiedCount"] | float | The number of documents modified. |
output["UpsertedCount"] | float | The number of documents upserted. 0 if upsert is false . |
output["UpsertedID"] | Optional[str] | The _id for the upserted document. null if upsert is false . |
Example
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
update | object | Required | The documents to update. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
Field | Type | Description |
---|
output | object | Returns the original document. |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
update | object | Required | The documents to update. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
Field | Type | Description |
---|
output | object | Returns the original document. |
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
collection | str | Required | The MongoDB collection. |
update | Dict[str, Any] | Required | The document to update. |
filter | Optional[Dict[str, Any]] | None | Optional filter criteria. Returns all documents if filter is not provided. |
projection | Optional[Dict[str, Any]] | None | Specify which fields to return in the results. |
sort | Optional[Dict[str, Any]] | None | Specify the sort order of results. |
Field | Type | Description |
---|
output | Dict[str, Any] | Returns the original document. |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
update | object | Required | The documents to update. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
Field | Type | Description |
---|
output | object | Returns the original document. |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
update | object | Required | The documents to update. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
Field | Type | Description |
---|
output | object | Returns the original document. |
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
collection | str | Required | The MongoDB collection. |
replacement | Dict[str, Any] | Required | The document to update. |
filter | Optional[Dict[str, Any]] | None | Optional filter criteria. Returns all documents if filter is not provided. |
projection | Optional[Dict[str, Any]] | None | Specify which fields to return in the results. |
sort | Optional[Dict[str, Any]] | None | Specify the sort order of results. |
Field | Type | Description |
---|
output | Dict[str, Any] | Returns the original document. |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
document | object | Required | The document to insert. |
Field | Type | Description |
---|
output.InsertedID | string | The _id of the inserted document. |
Example
2
"InsertedID": "62c4caa466499db2981e496e"
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
document | object | Required | The document to insert. |
Field | Type | Description |
---|
output.InsertedID | string | The _id of the inserted document. |
Example
2
"InsertedID": "62c4caa466499db2981e496e"
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
collection | str | Required | The MongoDB collection. |
document | Dict[str, Any] | Required | The document to insert. |
Field | Type | Description |
---|
output["InsertedID"] | str | The _id of the inserted document. |
Example
2
"InsertedID": "62c4caa466499db2981e496e"
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
documents | []object | Required | The documents to insert. |
Field | Type | Description |
---|
output.InsertedIDs | string[] | A list containing _id values for each inserted document |
Example
2
"InsertedIDs": ["63250df2b895dfd52a6420c3", "63250df2b895dfd52a6420c4"]
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
documents | []object | Required | The documents to insert. |
Field | Type | Description |
---|
output.InsertedIDs | string[] | A list containing _id values for each inserted document |
Example
2
"InsertedIDs": ["63250df2b895dfd52a6420c3", "63250df2b895dfd52a6420c4"]
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
collection | str | Required | The MongoDB collection. |
documents | List[Dict[str, Any]] | Required | The documents to insert. |
Field | Type | Description |
---|
output["InsertedIDs"] | List[str] | A list containing _id values for each inserted document |
Example
2
"InsertedIDs": ["63250df2b895dfd52a6420c3", "63250df2b895dfd52a6420c4"]
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
Field | Type | Description |
---|
output | object | Returns the deleted document. |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
Field | Type | Description |
---|
output | object | Returns the deleted document. |
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
collection | str | Required | The MongoDB collection. |
filter | Optional[Dict[str, Any]] | None | Optional filter criteria. Returns all documents if filter is not provided. |
projection | Optional[Dict[str, Any]] | None | Specify which fields to return in the results. |
sort | Optional[Dict[str, Any]] | None | Specify the sort order of results. |
Field | Type | Description |
---|
output | Dict[str, Any] | Returns the deleted document. |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
Field | Type | Description |
---|
output.DeletedCount | number | The number of deleted documents. |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
Field | Type | Description |
---|
output.DeletedCount | number | The number of deleted documents. |
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
collection | str | Required | The MongoDB collection. |
filter | Optional[Dict[str, Any]] | None | Optional filter criteria. Returns all documents if filter is not provided. |
projection | Optional[Dict[str, Any]] | None | Specify which fields to return in the results. |
sort | Optional[Dict[str, Any]] | None | Specify the sort order of results. |
Field | Type | Description |
---|
output.DeletedCount | float | The number of deleted documents. |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
Field | Type | Description |
---|
output.DeletedCount | number | The number of deleted documents. |
Example
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
opts.filter | object | null | Optional filter criteria. Returns all documents if filter is not provided. |
opts.projection | object | null | Specify which fields to return in the results. |
opts.sort | object | null | Specify the sort order of results. |
Field | Type | Description |
---|
output.DeletedCount | number | The number of deleted documents. |
Example
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
collection | str | Required | The MongoDB collection. |
filter | Optional[Dict[str, Any]] | None | Optional filter criteria. Returns all documents if filter is not provided. |
projection | Optional[Dict[str, Any]] | None | Specify which fields to return in the results. |
sort | Optional[Dict[str, Any]] | None | Specify the sort order of results. |
Field | Type | Description |
---|
output["DeletedCount"] | float | The number of deleted documents. |
Example
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
pipeline | []object | Required | See aggregation-pipeline. |
Field | Type | Description |
---|
output | []object | A list of documents produced by the final stage of the aggregation pipeline operation. |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
pipeline | []object | Required | See aggregation-pipeline. |
Field | Type | Description |
---|
output | []object | A list of documents produced by the final stage of the aggregation pipeline operation. |
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
collection | str | Required | The MongoDB collection. |
pipeline | List[Dict[str, Any]] | Required | See aggregation-pipeline. |
Field | Type | Description |
---|
output | List[Dict[str, Any]] | A list of documents produced by the final stage of the aggregation pipeline operation. |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
filter | object | Required | Criteria to filter by. |
Field | Type | Description |
---|
output | number | The count of documents that match the query . |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
collection | string | Required | The MongoDB collection. |
filter | object | Required | Criteria to filter by. |
Field | Type | Description |
---|
output | number | The count of documents that match the query . |
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
collection | str | Required | The MongoDB collection. |
filter | Dict[str, Any] | Required | Criteria to filter by. |
Field | Type | Description |
---|
output | float | The count of documents that match the query . |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
field | string | Required | The field to count. |
collection | string | Required | The MongoDB collection. |
filter | object | Required | Criteria to filter by. |
Field | Type | Description |
---|
output | []object | A list of distinct values for a specified field across the searched collection or view. |
Field | Type | Default | Description |
---|
mongodbResource | string | Required | Slug of REST resource to use. See Resources. |
field | string | Required | The field to count. |
collection | string | Required | The MongoDB collection. |
filter | object | Required | Criteria to filter by. |
Field | Type | Description |
---|
output | []object | A list of distinct values for a specified field across the searched collection or view. |
Field | Type | Default | Description |
---|
mongodb_resource | str | Required | Slug of REST resource to use. See Resources. |
field | str | Required | The field to count. |
collection | str | Required | The MongoDB collection. |
filter | Dict[str, Any] | Required | Criteria to filter by. |
Field | Type | Description |
---|
output | List[Dict[str, Any]] | A list of distinct values for a specified field across the searched collection or view. |