複数のデータソースをリンクする
複数のデータソースをアプリにリンクするには、このエンドポイントを呼び出します。 アプリごとのリンクされたデータソースの合計制限は100です。 このエンドポイントによってリンクされるデータソースには、 ReadAndWrite
のデフォルト ルールが適用されます。
path パラメータ
-
Atlas Project/Group ID。
-
アプリケーションの ObjectID。App Services API プロジェクトとアプリケーション ID のセクションでは、この値を見つける方法が示されています。
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"}}]'
リクエスト例
[
{
"name": "first-cluster",
"type": "mongodb-atlas",
"config": {
"clusterName": "Cluster0"
}
}
]
応答の例(400)
FailedLinkingDataSourceResponse
{
"failedClusterNames": [
"first-cluster"
]
}
{
"error": "string",
"error_code": "string"
}