发布 /api/v1/orgs/{orgId}/项目

在 URL 路径中的组织内创建新项目。代理引擎 原生组织需要 ORG_ADMIN 或 SYSTEM_ADMIN 并插入一个代理引擎 项目。由 Atlas 支持的组织使用调用者的委托 Atlas 授权(ORG_ADMIN 在该组织上;Atlas ORG_OWNER 或 ORG_GROUP_CREATOR)在 Atlas 中创建项目,并返回一个代理引擎项目记录。Atlas 组织下由代理引擎拥有的子项未创建。

路径参数

  • orgId 字符串 必需

    组织 ID

application/json

body 必需

项目创建

  • allow_成员_邀请 布尔
  • 描述 字符串
  • 名称 字符串 必需

    验证前会剪除名称中的空格。必须是 1-64 个字符,并且可以包含 Unicode 字母/数字、空格以及字符 - _ .( ) 、 & @ + '.

    最小长度为 1,最大长度为 64。

  • sharing_policy 对象
    隐藏共享策略属性 显示 sharing_policy 属性 对象
    • allowed_sources array[string]
    • share_modes array[string]
    • 可共享的 布尔

响应

  • 不支持或格式错误的 API 版本、所选已发布合同中不可用的操作,或不可接受的表示形式(包括不支持的媒体类型参数或排除的 SSE)。现有的身份验证、授权和速率限制失败具有优先权。

    隐藏响应属性 显示响应属性 对象
    • badRequestDetail 对象

      由标准错误模式定义的可选验证详细信息;API 协商错误不会发出此字段。

      隐藏 BadRequestDetail 属性 显示 BadRequestDetail 属性 对象
      • 字段 大量[对象]

        字段验证失败。

        隐藏字段属性 显示字段属性 对象

        字段及其验证失败。

        • 描述 字符串 必需

          人类可读验证失败。

        • 字段 字符串 必需

          无效请求字段的名称或路径。

    • 详细信息 字符串 必需

      可读的错误详情。

    • 错误 整型 必需

      HTTP status code.

    • 错误代码 字符串 必需

      机器可读的错误码。

    • 参数 array[string]

      与错误相关的请求参数名称;当无相关参数时省略。

    • 原因 字符串 必需

      HTTP 状态原因语句。

    隐藏响应属性 显示响应属性 对象
    • badRequestDetail 对象

      由标准错误模式定义的可选验证详细信息;API 协商错误不会发出此字段。

      隐藏 BadRequestDetail 属性 显示 BadRequestDetail 属性 对象
      • 字段 大量[对象]

        字段验证失败。

        隐藏字段属性 显示字段属性 对象

        字段及其验证失败。

        • 描述 字符串 必需

          人类可读验证失败。

        • 字段 字符串 必需

          无效请求字段的名称或路径。

    • 详细信息 字符串 必需

      可读的错误详情。

    • 错误 整型 必需

      HTTP status code.

    • 错误代码 字符串 必需

      机器可读的错误码。

    • 参数 array[string]

      与错误相关的请求参数名称;当无相关参数时省略。

    • 原因 字符串 必需

      HTTP 状态原因语句。

  • 201

    已创建

    隐藏响应属性 显示响应属性 对象
    • allow_成员_邀请 布尔
    • atlas 对象
      隐藏 Atlas 属性 显示 Atlas 属性 对象
      • environment 字符串 必需
      • id 字符串 必需
      • organization_id 字符串 必需
    • can_manage_deployments 布尔
    • created_at 字符串
    • 描述 字符串
    • id 字符串
    • 名称 字符串
    • org_id 字符串
    • sharing_policy 对象
      隐藏共享策略属性 显示 sharing_policy 属性 对象
      • allowed_sources array[string]
      • share_modes array[string]
      • 可共享的 布尔
    • 来源 字符串

      值为 atlas 或 agent_engine。

    • updated_at 字符串
    • workspace_count 整型

      WorkspaceCount 是项目中未删除的工作区的数量。在列表响应中包含,在单个项目的 GET 请求中省略。

    隐藏响应属性 显示响应属性 对象
    • allow_成员_邀请 布尔
    • atlas 对象
      隐藏 Atlas 属性 显示 Atlas 属性 对象
      • environment 字符串 必需
      • id 字符串 必需
      • organization_id 字符串 必需
    • can_manage_deployments 布尔
    • created_at 字符串
    • 描述 字符串
    • id 字符串
    • 名称 字符串
    • org_id 字符串
    • sharing_policy 对象
      隐藏共享策略属性 显示 sharing_policy 属性 对象
      • allowed_sources array[string]
      • share_modes array[string]
      • 可共享的 布尔
    • 来源 字符串

      值为 atlas 或 agent_engine。

    • updated_at 字符串
    • workspace_count 整型

      WorkspaceCount 是项目中未删除的工作区的数量。在列表响应中包含,在单个项目的 GET 请求中省略。

  • Bad Request

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
  • Unauthorized

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
  • 402

    ATLAS_需要付款方式

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
  • Forbidden

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
  • 未找到

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
  • 冲突

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
  • 内部服务器错误

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
  • 错误网关

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
  • 服务不可用

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
帖子 /API/v1/orgs/{orgId}/项目
curl \
 --request POST 'https://agentengine.mongodb.com/api/v1/orgs/{orgId}/projects' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{
  "allow_member_invites": true,
  "description": "string",
  "name": "string",
  "sharing_policy": {
    "allowed_sources": [
      "string"
    ],
    "share_modes": [
      "string"
    ],
    "shareable": true
  }
}'
请求示例
{
  "allow_member_invites": true,
  "description": "string",
  "name": "string",
  "sharing_policy": {
    "allowed_sources": [
      "string"
    ],
    "share_modes": [
      "string"
    ],
    "shareable": true
  }
}
响应示例 (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)
{
  "allow_member_invites": true,
  "atlas": {
    "environment": "string",
    "id": "string",
    "organization_id": "string"
  },
  "can_manage_deployments": true,
  "created_at": "string",
  "description": "string",
  "id": "string",
  "name": "string",
  "org_id": "string",
  "sharing_policy": {
    "allowed_sources": [
      "string"
    ],
    "share_modes": [
      "string"
    ],
    "shareable": true
  },
  "source": "atlas",
  "updated_at": "string",
  "workspace_count": 42
}
响应示例 (201)
{
  "allow_member_invites": true,
  "atlas": {
    "environment": "string",
    "id": "string",
    "organization_id": "string"
  },
  "can_manage_deployments": true,
  "created_at": "string",
  "description": "string",
  "id": "string",
  "name": "string",
  "org_id": "string",
  "sharing_policy": {
    "allowed_sources": [
      "string"
    ],
    "share_modes": [
      "string"
    ],
    "shareable": true
  },
  "source": "atlas",
  "updated_at": "string",
  "workspace_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
}
响应示例 (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
}