MongoDB data connector configuration object consists of the following attributes:

AttributeDescription
typeConnector type; must be always set to mongodb.
idApp wide unique connector id.
serverProvide only the domain part of the URL without scheme.
portService port number.
connectionParametersOptional Map of connection parameters - up to 10.
credentialsOptional Username and password to connect to the broker.
databaseDatabase name.
collectionCollection name.
dataProcessingMethodOptional. Id or name of the App method that will be used for filtering and/or transforming incoming data. See Overview page for details.
disabledOptional. When true data connector stops streaming.
POST .../v3/apps/:ref/dataconnectors/test

{
  "type": "mongodb",
  "id": "dc.mongodb.1",
  "server": "cluster0-zqosj.mongodb.net",
  "port": 80,
  "credentials": {
    "user": "testuser",
    "password": "testuser"
  },
  "database": "test",
  "collection": "test",
  "connectionParameters": {
    "ssl": "true",
    "replicaSet": "Cluster0-shard-0",
    "retryWrites": "true",
    "w": "majority",
    "authSource": "admin"
  },
  "disabled": false
}
POST .../v3/apps/:ref/dataconnectors

{
  "type": "mongodb",
  "id": "dc.mongodb.1",
  "server": "cluster0-zqosj.mongodb.net",
  "port": 80,
  "credentials": {
    "user": "testuser",
    "password": "testuser"
  },
  "database": "test",
  "collection": "test",
  "connectionParameters": {
    "ssl": "true",
    "replicaSet": "Cluster0-shard-0",
    "retryWrites": "true",
    "w": "majority",
    "authSource": "admin"
  },
  "disabled": false
}
PUT .../v3/apps/:ref/dataconnectors/dc.mongodb.1

{
  "database": "test2",
  "collection": "test2"
}

Example for cloud.mongodb.com

https://cloud.mongodb.comhttps://cloud.mongodb.com

https://cloud.mongodb.com