路径参数
-
Atlas 项目/组 ID。
-
您的应用程序的 ObjectID。App Services API 项目和应用程序 ID 部分演示了如何查找此值。
PUT /groups/{groupId}/apps/{appId}/environment
curl \
--request PUT 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/environment' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"environment":"production"}'
请求示例
{
"environment": "production"
}
响应示例 (200)
{
"name": "MyApp",
"provider_region": "aws-us-east-1",
"location": "US-VA",
"deployment_model": "GLOBAL",
"environment": "production",
"_id": "633209ffd3bd3478005d1bac",
"client_app_id": "myapp-abcde",
"domain_id": "63320a2b5f9de9a6e0a213e8",
"group_id": "5b2ec991973129243223a114",
"last_used": 1664224746,
"last_modified": 1656440824,
"product": "standard"
}
响应示例 (400)
{
"error": "string",
"error_code": "string"
}