使用人类调用者的委托令牌或配对的代理引擎服务帐户代理Atlas Admin API POST /groups/{id}/accessList。不接受代理引擎API密钥。在任何Atlas调用之前,会拒绝比 /8 (IPv4) 或 /32 (IPv6) 更广泛的 CIDR,包括 IPv4 映射的 IPv6。在任何Atlas调用之前,无效的 project_id 都会被拒绝。
响应
-
不支持或格式不正确的API版本、所选已发布合约中不可用的操作或不可接受的表示形式(包括不支持的媒体类型参数或排除的 SSE)。现有的身份验证、授权和速率限制失败优先。
-
已创建
-
Bad Request
-
Unauthorized
-
ATLAS_PAYMENT_METHOD_REQUIRED
-
ATLAS_PERMISSION_REQUIRED、ATLAS_SERVICE_ACCOUNT_NOT_PAIRED 或 FORBIDDEN
-
NOT_FOUND
-
冲突
-
请求正文太大
-
INTERNAL_ERROR
-
错误网关
-
PLATFORM_OAUTH_NOT_CONFIGURED 或 SERVICE_UNAVAILABLE(当委托令牌刷新已在进行中时)
POST /api/v1/atlas/projects/{project_id}/access-list
curl \
--request POST 'https://agentengine.mongodb.com/api/v1/atlas/projects/{project_id}/access-list' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json"
请求示例
对象-1
{}
{
"cidr_block": "string",
"comment": "string",
"ip_address": "string"
}
响应示例 (406)
操作不可用
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation supports text/event-stream, which the Accept header excludes. Remove unsupported media-type parameters or accept this type with a positive q value.",
"error": 406,
"errorCode": "UNACCEPTABLE_MEDIA_TYPE",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "The requested API version is not supported. Supported versions: 2026-09-20-preview.",
"error": 406,
"errorCode": "UNSUPPORTED_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
响应示例 (406)
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
响应示例 (201)
{
"results": [
{
"cidr_block": "string",
"comment": "string",
"ip_address": "string"
}
],
"total_count": 42
}
响应示例 (201)
{
"results": [
{
"cidr_block": "string",
"comment": "string",
"ip_address": "string"
}
],
"total_count": 42
}
响应示例 (400)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (400)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (401)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (401)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (402)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (402)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (403)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (403)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (404)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (404)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (409)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (409)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (413)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (413)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (500)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (500)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (502)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (502)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (503)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (503)
{
"code": "string",
"error": "string",
"success": true
}