MongoDB links: API guide , Authentication
-
In the left pane, select Resources→Connections. Then, click + Create connection at the top right of the page.
-
On the Create connection page, in the Application search box, enter the first few letters of the database application that you want to connect to.
For example, enter
monin the search box, and from the resulting application list, click MongoDB.
Tip
You can also create a connection to an application while configuring a new export to retrieve data from the application or a new import to insert data into the application.
|
MongoDB connection setting |
Value |
|---|---|
|
Name |
Be sure to provide a clear and distinguishable. Throughout integrator.io imports and exports, you will have the option to choose this new connection, and a unique identifier will prove helpful later when selecting among a list of connections that you’ve created. |
|
Application (read only) |
Shows the database application that you had earlier selected to create a connection. |
|
Mode |
Select a Cloud (remote) or On-premise (network) server; for On-premise, there’s an additional step to specify an Agent. Agent: Select an agent from the list of agents in your account. To connect to an on-premise application, integrator.io requires that an agent be installed on a networked computer. An agent is a small application that allows you to connect to data behind your firewall. When installing an agent, you will specify a unique access token, which then populates the Agent drop-down list. The installed agents connect to integrator.io and establish a reverse SSH tunnel, allowing secure communication without the need to whitelist integrator.io’s IP addresses in your firewall settings. A single agent can be used by multiple different connections. |
Before you enter authentication details, see Configure MongoDB and retrieve values from connection string.
|
MongoDB connection setting |
Value |
|---|---|
|
Host(s): |
NoteMongoDB supports the following 2 connection string formats, which includes the host as a part of it, to connect to its database instances:
Currently, Celigo supports only the standard connection string format ( We plan to support the DNS seedlist connection format ( Enter the hostname or IP address for your MongoDB instance – for example: mongodb-instance1.com or 172.16.254.1. By default, integrator.io will connect to port 27017. If you need to connect to a different port, then append :port to your hostname – for example: mongodb-instance1.com:12345 or 172.16.254.1:98765. If you are connecting to a MongoDB cluster, then list all hostname:port combinations, separated by commas – for example: mongodb-instance1.com:12345,mongodb-instance2.com:12345,mongodb-instance3.com:12345. |
|
Database |
Enter the name of the database you would like to connect to. If left blank, the “admin” database will be queried. |
|
Username |
Enter the username for the account set up by the MongoDB server administrator. |
|
Password |
Enter the password for this account, if required. |
The following example reviews a MongoDB Atlas installation. First, click the Connect button on your cluster:
In the resulting Connect to... menu, click Connect your application.
Under Choose your driver version, select the following settings:
-
Driver: Node.js
-
Version: 2.2.12 or later
Important
Do not set Version to MongoDB 3.0+.
Before closing this dialog, under Connection string only click the Copy button. Then, paste the contents into a text editor. For example:
mongodb://mongodb-server : <password> @ mongodb-adaptor-server-00-00-5xtno.mongodb.net:27017,mongodb-adaptor-server-00-01-5xtno.mongodb.net:27017 / test ? ssl=true &replicaSet= mongodb-adaptor-server &authSource= admin&retryWrites=true&w=majority
The properties we need from this string are derived as follows:
|
Connection field |
Connection string |
Sample value |
|---|---|---|
|
Host(s) |
mongodb-adaptor-server-00-00-5xtno.mongodb.net:27017,mongodb-adaptor-server-00-01-5xtno.mongodb.net:27017 |
mongodb-adaptor-server-00-00-5xtno.mongodb.net:27017,mongodb-adaptor-server-00-01-5xtno.mongodb.net:27017 |
|
Database name |
test |
test |
|
Username |
mongodb-server |
mongodb-server |
|
Password |
<password> |
<password> |
|
Replica set |
mongodb-adaptor-server |
mongodb-adaptor-server |
|
TLS/SSL |
ssl=true |
[Check the box] |
|
Auth source |
admin |
admin |
Continuing in the Create connection pane, only if required, enter additional configuration information for the MongoDB server.
|
MongoDB connection setting |
Value |
|---|---|
|
Replica set (optional) |
Enter the name of the replica set. The replica set members must be supplied in the Host(s) field, above. |
|
TLS/SSL (optional) |
Check this box to enable TLS/SSL security for the connection. |
|
Auth source (optional) |
Enter the name of the database associated with the user’s credentials. If you do not specify an Auth source database, then the Database field above will be used as the default. |
Once you have configured the MongoDB connection, you have a few options for continuing:
-
Test connection – click this button to verify that your new connection is free of errors
-
Save and close – click this button to save the connection, commit the new connection so that it will be available to all integrations for your account (and applied to the current source or destination app, if you created it within a flow)
-
Save - click this button to save the connection
-
Close – click this link to exit connection creation without saving