MongoDB / Azure Cosmos DB / Amazon DocumentDB
Our current quickstart tutorial covers this in further detail.
Defining the database
- Define a
globals
section - Add the
databases
field - 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
database
input to your action - Pass the
database
identifier from the globals sectionmain
if 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/find
to find a document with a matching name. - Send a HTTP POST with a JSON payload eg.
{"name": "something", "status": false}
tomongodb/update
to find a document with a matching name and update the status value accordingly.
MongoDB Find and update
loading...