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.
Parámetros de path
-
An Atlas Project/Group ID.
-
El ObjectID de tu aplicación. La sección de ID de Proyecto y ID de la aplicación de App Services API muestra cómo encontrar este valor.
Respuestas
-
No content
-
- Data Sources exceeds the limit of 25 in the payload
- Data Sources exceed the limit of 100 on the App
- Múltiples reglas por defecto para una única fuente de datos
- El tipo de fuente de datos no es ni "mongodb-atlas" ni "datalake"
- El enlace falló para al menos una fuente de datos
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"}}]'
Solicitar ejemplos
[
{
"name": "first-cluster",
"type": "mongodb-atlas",
"config": {
"clusterName": "Cluster0"
}
}
]
Ejemplos de respuesta (400)
Failedlinkingdatasourceresponse
{
"failedClusterNames": [
"first-cluster"
]
}
{
"error": "string",
"error_code": "string"
}