获取 /API/v1/组织

只返回调用者是其成员的组织。当 Atlas 授权不可用时,最后反映的组织仍会以只读模式返回,并将 atlas_reauth_required 设置为 true。

响应

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

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

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

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

        字段验证失败。

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

        字段及其验证失败。

        • 描述 字符串 必需

          人类可读验证失败。

        • 字段 字符串 必需

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

    • 详细信息 字符串 必需

      可读的错误详情。

    • 错误 整型 必需

      HTTP status code.

    • 错误代码 字符串 必需

      机器可读的错误码。

    • 参数 array[string]

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

    • 原因 字符串 必需

      HTTP 状态原因语句。

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

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

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

        字段验证失败。

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

        字段及其验证失败。

        • 描述 字符串 必需

          人类可读验证失败。

        • 字段 字符串 必需

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

    • 详细信息 字符串 必需

      可读的错误详情。

    • 错误 整型 必需

      HTTP status code.

    • 错误代码 字符串 必需

      机器可读的错误码。

    • 参数 array[string]

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

    • 原因 字符串 必需

      HTTP 状态原因语句。

  • 200

    正常

    隐藏响应属性 显示响应属性 对象
    • Atlas 重新身份验证所需 布尔

      当 Atlas 授权不可用时,AtlasReauthRequired 在此 200 响应上设置,但网关仍将最后反映的组织返回为只读。客户端应该从此字段开始恢复;组织列表不返回 401 PLATFORM_OAUTH_* 。

    • limit 整型

      Limit 和 Offset 反映了所应用的分页。仅由分页的平台管理员列表设置;在面向节点的组织终结点上省略。

    • 偏移量 整型
    • organizations 大量[对象]
      隐藏组织属性 显示组织属性 对象
      • 管理员 大量[对象]

        管理员列出组织的 ORG_ADMINs。仅由平台管理员列表填充;在面向节点的组织终结点上省略。

        隐藏管理员属性 显示管理员属性 对象
        • 电子邮件 字符串
        • 名称 字符串
      • atlas 对象
        隐藏 Atlas 属性 显示 Atlas 属性 对象
        • environment 字符串 必需
        • id 字符串 必需
      • created_at 字符串
      • 描述 字符串
      • id 字符串
      • 名称 字符串
      • 来源 字符串

        值为 atlas 或 agent_engine。

      • updated_at 字符串
    • 总计 整型
    隐藏响应属性 显示响应属性 对象
    • Atlas 重新身份验证所需 布尔

      当 Atlas 授权不可用时,AtlasReauthRequired 在此 200 响应上设置,但网关仍将最后反映的组织返回为只读。客户端应该从此字段开始恢复;组织列表不返回 401 PLATFORM_OAUTH_* 。

    • limit 整型

      Limit 和 Offset 反映了所应用的分页。仅由分页的平台管理员列表设置;在面向节点的组织终结点上省略。

    • 偏移量 整型
    • organizations 大量[对象]
      隐藏组织属性 显示组织属性 对象
      • 管理员 大量[对象]

        管理员列出组织的 ORG_ADMINs。仅由平台管理员列表填充;在面向节点的组织终结点上省略。

        隐藏管理员属性 显示管理员属性 对象
        • 电子邮件 字符串
        • 名称 字符串
      • atlas 对象
        隐藏 Atlas 属性 显示 Atlas 属性 对象
        • environment 字符串 必需
        • id 字符串 必需
      • created_at 字符串
      • 描述 字符串
      • id 字符串
      • 名称 字符串
      • 来源 字符串

        值为 atlas 或 agent_engine。

      • updated_at 字符串
    • 总计 整型
  • 内部服务器错误

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
GET /api/v1/组织
curl \
 --request GET 'https://agentengine.mongodb.com/api/v1/organizations' \
 --header "Authorization: $API_KEY"
响应示例 (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"
}
响应示例 (200)
{
  "atlas_reauth_required": true,
  "limit": 42,
  "offset": 42,
  "organizations": [
    {
      "admins": [
        {
          "email": "string",
          "name": "string"
        }
      ],
      "atlas": {
        "environment": "string",
        "id": "string"
      },
      "created_at": "string",
      "description": "string",
      "id": "string",
      "name": "string",
      "source": "atlas",
      "updated_at": "string"
    }
  ],
  "total": 42
}
响应示例 (200)
{
  "atlas_reauth_required": true,
  "limit": 42,
  "offset": 42,
  "organizations": [
    {
      "admins": [
        {
          "email": "string",
          "name": "string"
        }
      ],
      "atlas": {
        "environment": "string",
        "id": "string"
      },
      "created_at": "string",
      "description": "string",
      "id": "string",
      "name": "string",
      "source": "atlas",
      "updated_at": "string"
    }
  ],
  "total": 42
}
响应示例 (500)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (500)
{
  "code": "string",
  "error": "string",
  "success": true
}