MongoDB / Azure Cosmos DB / Amazon DocumentDB
Our current quickstart tutorial covers this in further detail.
Defining the database
- Define a
globalssection - Add the
databasesfield - Add a database identifier
- Set the driver to
mongodb(you will use the same driver for Azure Cosmos DB and Amazon DocumentDB) - Add the connection string
For all available database and document_operation options see database inputs
See all the available operations under document_operation.
Adding the database to your action
- Add a
databaseinput to your action - Pass the
databaseidentifier from the globals sectionmainif defined or redefine a new database
View the steps in the quickstart tutorial on adding a connection here.
Using Operations
View the quickstart tutorial here.
MongoDB Find Example
Example to send a HTTP POST with a JSON payload eg. {"name": "test"} to find a document with username called test.
MongoDB Find
loading...
MongoDB Aggregate Example
Example to send a HTTP POST with a JSON payload eg. {"starts_with": "test"} to find documents using regex and limiting the result set to 30.
MongoDB Aggregate Pipeline
loading...
MongoDB Combined find and update
- Send a HTTP POST with a JSON payload eg.
{"name": "something"}tomongodb/findto find a document with a matching name. - Send a HTTP POST with a JSON payload eg.
{"name": "something", "status": false}tomongodb/updateto find a document with a matching name and update the status value accordingly.
MongoDB Find and update
loading...
MongoDB Data API example
Source: https://github.com/Tirslo/airpipe-mongodb-data-api
MongoDB Data API
loading...