Link multiple 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
-
An Atlas Project/Group ID.
-
The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value.
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)
Failedlinkingdatasourceresponse
{
"failedClusterNames": [
"first-cluster"
]
}
{
"error": "string",
"error_code": "string"
}