MongoDB By Cloudify
MongoDB By Cloudify is a set of mongodb functions that can be used to create, fetch and update mongodb documents.
KEY NOTE : Please pass Connection Url to connect mongodb/mongodb atlas as uri parameter.
The uri connection can be for example MongoDB Atlas uri : 'mongodb+srv://username:password@cluster0.xvsxc.mongodb.net/'
Dependencies
- MongoDB By Cloudify has the following dependencies on Autocode:
- lib : Autocode standard library Node.js bindings.
- mongodb : The official MongoDB driver for Node.js and this let your application to work with MongoDB in JavaScript.
Installation
Just like any other Autocode App, MongoDB By Cloudify can be installed as an Autocode Project, hosted in your own Autocode account and adapted by any user who chooses to use the application.
Setup
- Install the MongoDB By Cloudify App from the Apps section in Autocode or
Functions
MongoDB By Cloudify supports the following available functions. Keep in mind that functions may be added, updated or removed in future versions.
Create Collection
- creates collection on the specified database and returns the collection name.
- Note : Parameters to pass
(i) uri (String) - Connection Url to connect mongodb/mongodb atlas
(ii) dbName (String) - Database Name to be connected
(iv) collectionName (String) - Collection name to be created
Create Document
- creates document on the specified collection and returns the document id.
- Note : Parameters to pass
(i) uri (String) - Connection Url to connect mongodb/mongodb atlas
(ii) dbName (String) - Database Name to be connected
(iv) collectionName (String) - Collection name
(v) documents (Object) - Document object to be created
Get Document By Document ID
- Fetch Document details by providing document id and returns the document lists of that id.
- Note : Parameters to pass
(i) uri (String) - Connection Url to connect mongodb/mongodb atlas
(ii) dbName (String) - Database Name to be connected
(iv) collectionName (String) - Collection name
(v) docId (String) - Document ID of the document
Get Document By Filter (key/Value) pair object
- Fetch Document details by providing properties name and value in an object and returns the document lists.
- Note : Parameters to pass
(i) uri (String) - Connection Url to connect mongodb/mongodb atlas
(ii) dbName (String) - Database Name to be connected
(iv) collectionName (String) - Collection name
(v) filter (Object) - Pass key/value pair object to filter Document in collection
Update Documents
- update document on the specified document id and returns it.
Note : Parameters to pass
(i) uri (String) - Connection Url to connect mongodb/mongodb atlas
(ii) dbName (String) - Database Name to be connected
(iv) collectionName (String) - Collection name
(v) docId (String) - Document ID of the document
(vi) documents (Object) - Document object to be updated
Be sure to check the API Reference to know more about these endpoints.
Support
- If you want to suggest a new feature or require support at any stage of using our app, feel free to contact us at Cloudify Support.
External Links