MongoDB
App Vendor: MongoDB
App Category: IT Services
Connector Version: 1.0.1
API Version: v3
About App
MongoDB is a cross-platform document-oriented database program. classified as a NoSQL database program. MongoDB uses JSON-like documents with optional schemas which provides flexibility for the development team.
MongoDB app is configured with Orchestrate to perform the following actions:
Action Name | Description |
---|---|
Insert Multiple Documents | This action inserts multiple documents in a collection. |
Insert Single Document | This action inserts a single document in a collection. |
Run Query | This action queries in a collection and retrieves the results. |
Update Record | This action updates a record in a collection. |
Configuration Parameters
The following configuration parameters are required for the MongoDB app to communicate with the Mongo DB enterprise application. The parameters can be configured by creating instances in the app.
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Base URL | Enter the base URL. Example: "mongo.corp.net" | Text | Required | |
Cluster Name | Enter the cluster name. Example: "samplecluster" | Text | Required | |
Username | Enter the username. Example: "john.doe" | Text | Required | |
Password | Enter the password. | Password | Required |
Action: Insert Multiple Documents
This action inserts multiple documents in a collection.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Database Name | Enter the database name. Example: "phishing" | Text | Required | |
Collection | Enter the collection name. Example: "data" | Text | Required | |
Document Data | Enter the document data or record data to insert. Example: $LIST[$JSON[{"name": "john", "score": 100, "_id":"1"}]] | List | Required |
Example Request
[ { "collection": "data", "database_name": "phishing", "document_data": [ { "_id": "20", "name": "john" } ] } ]
Action: Insert Single Document
This action inserts a single document in a collection.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Database Name | Enter the database name. Example: "phishing" | Text | Required | |
Collection | Enter the collection name. Example: "data" | Text | Required | |
Document Data | Enter the document data or record data to insert. Example: $JSON[{"name": "john", "score": 100, "_id":"1"}] | Any | Required |
Example Request
[ { "collection": "data", "database_name": "phishing", "document_data": { "_id": "300", "name": "john", "score": 1000 } } ]
Action: Run Query
This action queries in a collection and retrieves the results.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Database Name | Enter the database name. Example: "phishing" | Text | Required | |
Collection | Enter the collection name. Example: "data" | Text | Required | |
Query | Enter the query to search for. Example: $JSON[{'name':'john'}] | Any | Required |
Example Request
[ { "query": { "name": "john" }, "collection": "data", "database_name": "phishing" } ]
Action: Update Record
This action updates a record in a collection.
Action Input Parameters
Parameter | Description | Field Type | Required/Optional | Comments |
---|---|---|---|---|
Database Name | Enter the database name. Example: "phishing" | Text | Required | |
Collection | Enter the collection name. Example: "data" | Text | Required | |
Document ID | Enter the ID of the document to update. Example: "2" | Text | Required | |
Operator | Enter the operator. Example: "$set" | Text | Required | Allowed values:
|
Key Values | Enter the keys and values to update in a document. Example: {"name":"john"} | Key Value | Required |
Example Request
[ { "operator": "$set", "collection": "data", "key_values": { "name": "john" }, "document_id": "2", "database_name": "phishing" } ]