获取 /API/v1/项目/{id}/工作区/{workspace_id}/部署

代理到 ECP 以列出工作区的部署,并支持基于游标的分页和可选的状态过滤器。项目范围由路由 ID 路径参数传递,组织来自该项目。

路径参数

  • id 字符串 必需

    项目 ID

  • workspace_id 字符串 必需

    工作区 ID

查询参数

  • cursor 字符串

    不透明的分页游标

  • limit 整型

    页面大小 (1-100,默认 20)

  • 状态 字符串

    部署状态过滤器(已排队、进行中、正在清理、已成功、已失败、已回滚、已取消)

  • shipped_in_release 字符串

    返回在此版本中发布的部署:其自身的成品部署加上在切止日期之前完成的非发布部署。不包括回滚。

响应

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

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

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

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

        字段验证失败。

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

        字段及其验证失败。

        • 描述 字符串 必需

          人类可读验证失败。

        • 字段 字符串 必需

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

    • 详细信息 字符串 必需

      可读的错误详情。

    • 错误 整型 必需

      HTTP status code.

    • 错误代码 字符串 必需

      机器可读的错误码。

    • 参数 array[string]

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

    • 原因 字符串 必需

      HTTP 状态原因语句。

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

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

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

        字段验证失败。

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

        字段及其验证失败。

        • 描述 字符串 必需

          人类可读验证失败。

        • 字段 字符串 必需

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

    • 详细信息 字符串 必需

      可读的错误详情。

    • 错误 整型 必需

      HTTP status code.

    • 错误代码 字符串 必需

      机器可读的错误码。

    • 参数 array[string]

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

    • 原因 字符串 必需

      HTTP 状态原因语句。

  • 200

    正常

    隐藏响应属性 显示响应属性 对象
    • 部署 大量[对象]
      隐藏部署属性 显示部署属性 对象
      • aer_http_endpoint 字符串

        AERHTTPEndpoint 是代理沙盒 HTTP 终结点的旧版名称。

      • agent_http_endpoint 字符串

        AgentHTTPEndpoint 是代理沙箱 HTTP 终结点。与 aer_http_endpoint 值相同。

      • agent_stack_name 字符串
      • app_id 字符串
      • 分支 字符串
      • build_id 字符串
      • commit_sha 字符串
      • completed_at 字符串
      • component_images 对象
        隐藏 component_images 属性 显示 component_images 属性 对象
        • aer 字符串

          AER 是代理沙盒镜像的旧版名称。

        • 助手 字符串

          代理 是代理沙盒映像。与 aer 相同的值。

        • memory_server 字符串
        • oe 字符串
        • 工具 字符串
      • 组件 大量[对象]

        组件健康状态 —— 从 ECP 原样转发,用于详细视图。

        隐藏组件属性 显示组件属性 对象
        • available 布尔
        • failure_message 字符串
        • failure_reason 字符串
        • 名称 字符串
        • ready_replicas 整型
        • replicas 整型

          副本是期望的 Pod 数量。零表示平台尚未报告值;用户不得将零视为扩展到零。

        • sandbox 字符串

          Sandbox 是用于已知组件值(代理、工具)的规范沙箱名称。因上游名称未知而省略。

        • 类型 字符串
      • 条件 大量[对象]
        隐藏条件属性 显示条件属性 对象
        • last_transition_time 字符串
        • message 字符串
        • 原因 字符串
        • 状态 字符串
        • 类型 字符串
      • created_at 字符串

        时间戳。

      • deployment_id 字符串

        身份和核心状态(始终存在)。

      • duration_ms 整型
      • error_message 字符串

        故障详情将会显示出来,使管理界面无需先进入 Splunk 即可进行初步处理。

      • executor_type 字符串
      • first_deploy 布尔

        FirstDeploy 对于每次尝试都为 true,直到工作区的第一次成功部署(包括该次部署)。当不知时省略。

      • 健康 对象

        扩展字段。

        隐藏健康属性 显示健康属性 对象
        • available 布尔
        • 检查时间 字符串
        • 组件 大量[对象]
          隐藏组件属性 显示组件属性 对象
          • 名称 字符串
          • 准备就绪 布尔
          • ready_replicas 整型
          • sandbox 字符串

            Sandbox 是用于已知组件值(代理、工具)的规范沙箱名称。因上游名称未知而省略。

      • image_uri 字符串

        图片 / 来源。

      • 语言 字符串

        语言是代理运行时语言("Python" | "Typescript"),从 ECP 转发。未设置时省略(较旧的构建默认为下游 Python)。

      • last_event_seq 整型
      • 内存启用 布尔

        MemoryEnabled 是部署的有效运行时内存设置。如果没有,则省略。

      • 缺失秘密 array[string]
      • operator_namespace 字符串
      • org_id 字符串
      • post_deploy_error_message 字符串
      • previous_image_uri 字符串
      • 项目_已删除 布尔

        当部署所属的项目已被软删除时为 true。始终发出,以便使用者可以根据该字段进行分支,而不是根据它的缺失。

      • PROJECT_ID 字符串
      • release_number 整型

        ReleaseNumber 是每个工作区的单调版本标识符(决定用户界面中的 v{N} 标签)。0/回填迁移前的旧版记录已省略。

      • requested_images 大量[对象]

        RequestedImages 是摘要固定的部署意图。对于在启用图像摘要追踪前创建的旧版部署,将其省略;[] 表示写入器已运行,但未解析任何内容。

        隐藏 requested_images 属性 显示 requested_images 属性 对象
        • 组件 字符串
        • 摘要 字符串
        • sandbox 字符串

          Sandbox 是用于已知组件值的标准 Sandbox 名称。因上游名称未知而省略。

      • requested_target_id 字符串

        RequestedTargetID 是内部 Fleet 来源,并且有意不会在 Gateway 响应中显示。为了兼容性,它保持为空。

      • rollback_error 字符串
      • rollback_from_id 字符串

        此部署从哪个状态回滚时进行设置。

      • rollback_of 字符串

        回滚联动。

      • shipped_in_release 字符串

        ShippedInRelease 是发布了此部署的发布版本。不属于任何一个时,省略。从 ECP 转发;在读取时计算得出。

      • source_build_id 字符串
      • source_project_id 字符串
      • source_promotion_id 字符串
      • source_workspace_id 字符串
      • 开始时间 字符串
      • 状态 字符串
      • target_namespace 字符串

        Kubernetes 安排。

      • 触发器 字符串
      • updated_at 字符串
      • 版本 字符串

        版本是从 ECP 转发的开发者声明的代理版本。对于未版本化的记录,将忽略此项。

    • limit 整型

      由全平台偏移分页的管理员列表设置。每工作区域终结点会将这些值设为零,并在传输过程中被忽略。

    • 下一个光标 字符串

      由游标分页的每个工作区管理员列表设置。全平台的终结点将其留空。

    • 偏移量 整型
    • 总计 整型
    隐藏响应属性 显示响应属性 对象
    • 部署 大量[对象]
      隐藏部署属性 显示部署属性 对象
      • aer_http_endpoint 字符串

        AERHTTPEndpoint 是代理沙盒 HTTP 终结点的旧版名称。

      • agent_http_endpoint 字符串

        AgentHTTPEndpoint 是代理沙箱 HTTP 终结点。与 aer_http_endpoint 值相同。

      • agent_stack_name 字符串
      • app_id 字符串
      • 分支 字符串
      • build_id 字符串
      • commit_sha 字符串
      • completed_at 字符串
      • component_images 对象
        隐藏 component_images 属性 显示 component_images 属性 对象
        • aer 字符串

          AER 是代理沙盒镜像的旧版名称。

        • 助手 字符串

          代理 是代理沙盒映像。与 aer 相同的值。

        • memory_server 字符串
        • oe 字符串
        • 工具 字符串
      • 组件 大量[对象]

        组件健康状态 —— 从 ECP 原样转发,用于详细视图。

        隐藏组件属性 显示组件属性 对象
        • available 布尔
        • failure_message 字符串
        • failure_reason 字符串
        • 名称 字符串
        • ready_replicas 整型
        • replicas 整型

          副本是期望的 Pod 数量。零表示平台尚未报告值;用户不得将零视为扩展到零。

        • sandbox 字符串

          Sandbox 是用于已知组件值(代理、工具)的规范沙箱名称。因上游名称未知而省略。

        • 类型 字符串
      • 条件 大量[对象]
        隐藏条件属性 显示条件属性 对象
        • last_transition_time 字符串
        • message 字符串
        • 原因 字符串
        • 状态 字符串
        • 类型 字符串
      • created_at 字符串

        时间戳。

      • deployment_id 字符串

        身份和核心状态(始终存在)。

      • duration_ms 整型
      • error_message 字符串

        故障详情将会显示出来,使管理界面无需先进入 Splunk 即可进行初步处理。

      • executor_type 字符串
      • first_deploy 布尔

        FirstDeploy 对于每次尝试都为 true,直到工作区的第一次成功部署(包括该次部署)。当不知时省略。

      • 健康 对象

        扩展字段。

        隐藏健康属性 显示健康属性 对象
        • available 布尔
        • 检查时间 字符串
        • 组件 大量[对象]
          隐藏组件属性 显示组件属性 对象
          • 名称 字符串
          • 准备就绪 布尔
          • ready_replicas 整型
          • sandbox 字符串

            Sandbox 是用于已知组件值(代理、工具)的规范沙箱名称。因上游名称未知而省略。

      • image_uri 字符串

        图片 / 来源。

      • 语言 字符串

        语言是代理运行时语言("Python" | "Typescript"),从 ECP 转发。未设置时省略(较旧的构建默认为下游 Python)。

      • last_event_seq 整型
      • 内存启用 布尔

        MemoryEnabled 是部署的有效运行时内存设置。如果没有,则省略。

      • 缺失秘密 array[string]
      • operator_namespace 字符串
      • org_id 字符串
      • post_deploy_error_message 字符串
      • previous_image_uri 字符串
      • 项目_已删除 布尔

        当部署所属的项目已被软删除时为 true。始终发出,以便使用者可以根据该字段进行分支,而不是根据它的缺失。

      • PROJECT_ID 字符串
      • release_number 整型

        ReleaseNumber 是每个工作区的单调版本标识符(决定用户界面中的 v{N} 标签)。0/回填迁移前的旧版记录已省略。

      • requested_images 大量[对象]

        RequestedImages 是摘要固定的部署意图。对于在启用图像摘要追踪前创建的旧版部署,将其省略;[] 表示写入器已运行,但未解析任何内容。

        隐藏 requested_images 属性 显示 requested_images 属性 对象
        • 组件 字符串
        • 摘要 字符串
        • sandbox 字符串

          Sandbox 是用于已知组件值的标准 Sandbox 名称。因上游名称未知而省略。

      • requested_target_id 字符串

        RequestedTargetID 是内部 Fleet 来源,并且有意不会在 Gateway 响应中显示。为了兼容性,它保持为空。

      • rollback_error 字符串
      • rollback_from_id 字符串

        此部署从哪个状态回滚时进行设置。

      • rollback_of 字符串

        回滚联动。

      • shipped_in_release 字符串

        ShippedInRelease 是发布了此部署的发布版本。不属于任何一个时,省略。从 ECP 转发;在读取时计算得出。

      • source_build_id 字符串
      • source_project_id 字符串
      • source_promotion_id 字符串
      • source_workspace_id 字符串
      • 开始时间 字符串
      • 状态 字符串
      • target_namespace 字符串

        Kubernetes 安排。

      • 触发器 字符串
      • updated_at 字符串
      • 版本 字符串

        版本是从 ECP 转发的开发者声明的代理版本。对于未版本化的记录,将忽略此项。

    • limit 整型

      由全平台偏移分页的管理员列表设置。每工作区域终结点会将这些值设为零,并在传输过程中被忽略。

    • 下一个光标 字符串

      由游标分页的每个工作区管理员列表设置。全平台的终结点将其留空。

    • 偏移量 整型
    • 总计 整型
  • Bad Request

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

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

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
GET /API/v1/项目/{id}/工作区/{workspace_id}/部署
curl \
 --request GET 'https://agentengine.mongodb.com/api/v1/projects/{id}/workspaces/{workspace_id}/deployments' \
 --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)
{
  "deployments": [
    {
      "aer_http_endpoint": "string",
      "agent_http_endpoint": "string",
      "agent_stack_name": "string",
      "app_id": "string",
      "branch": "string",
      "build_id": "string",
      "commit_sha": "string",
      "completed_at": "string",
      "component_images": {
        "aer": "string",
        "agent": "string",
        "memory_server": "string",
        "oe": "string",
        "tool": "string"
      },
      "components": [
        {
          "available": true,
          "failure_message": "string",
          "failure_reason": "string",
          "name": "string",
          "ready_replicas": 42,
          "replicas": 42,
          "sandbox": "string",
          "type": "string"
        }
      ],
      "conditions": [
        {
          "last_transition_time": "string",
          "message": "string",
          "reason": "string",
          "status": "string",
          "type": "string"
        }
      ],
      "created_at": "string",
      "deployment_id": "string",
      "duration_ms": 42,
      "error_message": "string",
      "executor_type": "string",
      "first_deploy": true,
      "health": {
        "available": true,
        "checked_at": "string",
        "components": [
          {
            "name": "string",
            "ready": true,
            "ready_replicas": 42,
            "sandbox": "string"
          }
        ]
      },
      "image_uri": "string",
      "language": "string",
      "last_event_seq": 42,
      "memory_enabled": true,
      "missing_secrets": [
        "string"
      ],
      "operator_namespace": "string",
      "org_id": "string",
      "post_deploy_error_message": "string",
      "previous_image_uri": "string",
      "project_deleted": true,
      "project_id": "string",
      "release_number": 42,
      "requested_images": [
        {
          "component": "string",
          "digest": "string",
          "sandbox": "string"
        }
      ],
      "requested_target_id": "string",
      "rollback_error": "string",
      "rollback_from_id": "string",
      "rollback_of": "string",
      "shipped_in_release": "string",
      "source_build_id": "string",
      "source_project_id": "string",
      "source_promotion_id": "string",
      "source_workspace_id": "string",
      "started_at": "string",
      "status": "string",
      "target_namespace": "string",
      "trigger": "string",
      "updated_at": "string",
      "version": "string"
    }
  ],
  "limit": 42,
  "next_cursor": "string",
  "offset": 42,
  "total": 42
}
响应示例 (200)
{
  "deployments": [
    {
      "aer_http_endpoint": "string",
      "agent_http_endpoint": "string",
      "agent_stack_name": "string",
      "app_id": "string",
      "branch": "string",
      "build_id": "string",
      "commit_sha": "string",
      "completed_at": "string",
      "component_images": {
        "aer": "string",
        "agent": "string",
        "memory_server": "string",
        "oe": "string",
        "tool": "string"
      },
      "components": [
        {
          "available": true,
          "failure_message": "string",
          "failure_reason": "string",
          "name": "string",
          "ready_replicas": 42,
          "replicas": 42,
          "sandbox": "string",
          "type": "string"
        }
      ],
      "conditions": [
        {
          "last_transition_time": "string",
          "message": "string",
          "reason": "string",
          "status": "string",
          "type": "string"
        }
      ],
      "created_at": "string",
      "deployment_id": "string",
      "duration_ms": 42,
      "error_message": "string",
      "executor_type": "string",
      "first_deploy": true,
      "health": {
        "available": true,
        "checked_at": "string",
        "components": [
          {
            "name": "string",
            "ready": true,
            "ready_replicas": 42,
            "sandbox": "string"
          }
        ]
      },
      "image_uri": "string",
      "language": "string",
      "last_event_seq": 42,
      "memory_enabled": true,
      "missing_secrets": [
        "string"
      ],
      "operator_namespace": "string",
      "org_id": "string",
      "post_deploy_error_message": "string",
      "previous_image_uri": "string",
      "project_deleted": true,
      "project_id": "string",
      "release_number": 42,
      "requested_images": [
        {
          "component": "string",
          "digest": "string",
          "sandbox": "string"
        }
      ],
      "requested_target_id": "string",
      "rollback_error": "string",
      "rollback_from_id": "string",
      "rollback_of": "string",
      "shipped_in_release": "string",
      "source_build_id": "string",
      "source_project_id": "string",
      "source_promotion_id": "string",
      "source_workspace_id": "string",
      "started_at": "string",
      "status": "string",
      "target_namespace": "string",
      "trigger": "string",
      "updated_at": "string",
      "version": "string"
    }
  ],
  "limit": 42,
  "next_cursor": "string",
  "offset": 42,
  "total": 42
}
响应示例 (400)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (400)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (403)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (403)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (502)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (502)
{
  "code": "string",
  "error": "string",
  "success": true
}