Link multiple data sources

POST /groups/{groupId}/apps/{appId}/multi_data_sources

Call this endpoint to link multiple data sources to an App. The total limit of linked data sources per App is 100. Data Sources linked by this endpoint will have ReadAndWrite default rules.

Path parameters

application/json

Body

  • name string

    Create a name to identify each cluster you want to link.

  • type string

    The type of the data source you want to link.

    Values are mongodb-atlas or datalake.

  • config object
    Hide config attribute Show config attribute object
    • clusterName string Required

      The cluster name of the data source within. The name may be at most 64 characters long and must only contain ASCII letters, numbers, underscores, and hyphens.

Responses

  • 201

    No content

  • 400 application/json
    • Data Sources exceeds the limit of 25 in the payload
    • Data Sources exceed the limit of 100 on the App
    • Multiple Default Rules for a single Data Source
    • Type of Data Source is neither "mongodb-atlas" nor "datalake"
    • Linking failed for at least one Data Source
    One of:
POST /groups/{groupId}/apps/{appId}/multi_data_sources
curl \
 --request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/multi_data_sources' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '[{"name":"first-cluster","type":"mongodb-atlas","config":{"clusterName":"Cluster0"}}]'
Request examples
[
  {
    "name": "first-cluster",
    "type": "mongodb-atlas",
    "config": {
      "clusterName": "Cluster0"
    }
  }
]
Response examples (400)
{
  "failedClusterNames": [
    "first-cluster"
  ]
}
{
  "error": "string",
  "error_code": "string"
}