How to configure MongoDB connection

The following steps shows how to configure the MongoDB connector in Foundry

Step 1: After creating the database + collections in MongoDB, ensure the IP addresses accessing Mongo DB are added to the MongoDB Network Access. In my case it will be for Foundry, Managed.demo and my own local IP address.

Step 2: Get the connection string from MongoDB atlas site

Step 3: In foundry, select integration > configure new > Service Type > MongoDB
Enter the URI into the textbox, the format will be as follows:

mongodb+srv://<>:<db_password>@<>.cdnih.mongodb.net/<< Database name created in mongoDB >>

Step 4: Test connection. If it fails, check that the IP address is added to the MongoDB Network Access.

Step 5: Proceed to add Operations to the service, by default the following operations will be available in the Operations list.


Step 6: Select the operation to use and change the Name and Operation Security Level (if testing within a local environment, setting Public will be fine. If it is a production environment always set it to Authenticated users). Under Request Input > Select OData Query and enter the Default Value in $filter to retrieve the correct documents from MongoDB. Click on Save and Fetch.

If successful, the JSON results should be returned.

If there is an error, the most likely reason is because the $filter value is not set.

https://help.hcl-software.com/voltmx/v9.5/Foundry/voltmx_foundry_user_guide/Content/MongoDB_Adapter.html

Hope that helps!