Vincular múltiples fuentes de datos

publicación /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.

Parámetros de path

aplicación/json

Cuerpo

  • Nombre string

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

  • tipo string

    The type of the data source you want to link.

    Los valores son mongodb-atlas o datalake.

  • config Objeto
    Ocultar atributo de configuración Show config attribute Objeto
    • Nombre del clúster string Requerido

      El nombre del clúster de la fuente de datos. El nombre puede tener un máximo de 64 caracteres y solo debe contener letras ASCII, números, guiones bajos y guiones.

Respuestas

  • 201

    No content

  • 400 aplicación/json
    • 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
    Uno de:
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 respuestas (400)
{
  "failedClusterNames": [
    "first-cluster"
  ]
}
{
  "error": "string",
  "error_code": "string"
}