---
updatedAt: 2025-06-09T22:26:30.000Z
agentTools:
  projectIndex: https://docs.connio.com/llms.txt
---

# MongoDB

MongoDB data connector configuration object consists of the following attributes:

| Attribute            | Description                                                                                                                                                                  |
| :------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type                 | Connector type; must be always set to `mongodb`.                                                                                                                             |
| id                   | App wide unique connector id.                                                                                                                                                |
| server               | Provide only the domain part of the URL without scheme.                                                                                                                      |
| port                 | Service port number.                                                                                                                                                         |
| connectionParameters | **Optional** Map of connection parameters - up to 10.                                                                                                                        |
| credentials          | **Optional** Username and password to connect to the broker.                                                                                                                 |
| database             | Database name.                                                                                                                                                               |
| collection           | Collection name.                                                                                                                                                             |
| dataProcessingMethod | **Optional**. Id or name of the App method that will be used for filtering  and/or transforming incoming data. See [Overview](https://docs.connio.com/docs/data-connector-overview) page for details. |
| disabled             | **Optional**. When `true` data connector stops streaming.                                                                                                                    |

```json Test
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
}
```
```json Create
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
}
```
```json Update
PUT .../v3/apps/:ref/dataconnectors/dc.mongodb.1

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

## Example for cloud.mongodb.com

<Image title="Screen Shot 2019-10-21 at 4.09.13 PM.png" alt={1354} src="https://files.readme.io/88b8389-Screen_Shot_2019-10-21_at_4.09.13_PM.png">
  [https://cloud.mongodb.com](https://cloud.mongodb.com)
</Image>