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

返回由路由 ID 路径参数标识的项目中的所有工作区。需要有效的 Bearer token 和项目角色。

路径参数

  • id 字符串 必需

    项目 ID

响应

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

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

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

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

        字段验证失败。

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

        字段及其验证失败。

        • 描述 字符串 必需

          人类可读验证失败。

        • 字段 字符串 必需

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

    • 详细信息 字符串 必需

      可读的错误详情。

    • 错误 整型 必需

      HTTP status code.

    • 错误代码 字符串 必需

      机器可读的错误码。

    • 参数 array[string]

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

    • 原因 字符串 必需

      HTTP 状态原因语句。

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

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

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

        字段验证失败。

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

        字段及其验证失败。

        • 描述 字符串 必需

          人类可读验证失败。

        • 字段 字符串 必需

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

    • 详细信息 字符串 必需

      可读的错误详情。

    • 错误 整型 必需

      HTTP status code.

    • 错误代码 字符串 必需

      机器可读的错误码。

    • 参数 array[string]

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

    • 原因 字符串 必需

      HTTP 状态原因语句。

  • 200

    正常

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

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

      • 代理卡 对象
        隐藏 agent_card 属性 显示 agent_card 属性 对象
        • a2a_允许的调用者 array[string]

          A2AAllowedCallers 限制哪些工作区 ID 可以通过 A2A 调用此代理。空列表意味着允许任何调用者。

        • a2a_已启用 布尔

          A2AEnabled 控制此代理是否可被发现以响应 A2A 调用。

        • 功能 array[string]
        • input_modes array[string]

          InputModes 列出代理接受的 MIME 类型(例如:"text/plain", "应用程序/JSON")。

        • output_modes array[string]

          OutputModes 列出代理可以输出的 MIME 类型。

        • 技能 大量[对象]

          技能列出了代理可以执行的独立任务。

          隐藏技能属性 显示技能属性 对象
          • 描述 字符串
          • example_input 字符串
          • example_output 字符串
          • 名称 字符串
        • 总结 字符串
      • agent_grpc_endpoint 字符串
      • agent_http_endpoint 字符串

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

      • auto_deploy 布尔

        AutoDeploy 是 ECP 所有的针对每个应用的自动部署开关。ECP 所有,每次 detail GET 请求时获取(未持久存储在网关数据库中)。当 ECP 没有值或无法访问时,状态为不存在;用户界面将不存在状态视为关闭状态。

      • completion_rate 数字
      • created_date 字符串
      • current_deployment_id 字符串
      • current_payload_ref 字符串
      • 描述 字符串
      • 功能 对象
        隐藏功能属性 显示功能属性 对象
        • 护栏 布尔
        • 内存 布尔
        • Playground 布尔

          Playground 报告 Playground 用户界面是否已为工作区预配(空/真 = 已预配,当前行为)。当为 false 时,调用者直接使用 invoke API。

        • use_custom_parser 布尔

          UseCustomParser 在为 true 时,使 Gateway 只在调用流上发出代理的 output-parser 自定义事件(放弃平台帧)。在 agentengine 初始化时,从 agent.yaml 功能中加载并持久化。

      • 框架 字符串
      • github_installation_id 整型

        GithubInstallationID 是拥有该仓库的 Github 应用安装实例。ECP 所有,在每次详细信息 GET 请求时获取(不会持久存储在网关数据库中),因此,它对在此字段存在之前创建的工作区也有效。用户界面需要此功能,以便在编辑跟踪分支时列出存储库的分支。

      • gitops 对象
        隐藏 gitops 属性 显示 gitops 属性 对象
        • 分支 字符串
        • connection_ref 字符串
        • github_installation_id integer(int64)
        • manifest_path 字符串
        • provider 字符串
        • repo_url 字符串
      • id 字符串
      • 实例 对象

        实例显示工作区的实例数(活动、待机和启动),从工作区的 OE 单元实时获取。当 OE 无法访问或工作区未以池化方式运行时不存在(例如容器模式)。有意不暴露任何内部实现命名:这是一个面向客户的字段。

        隐藏实例属性 显示实例属性 对象
        • 活跃的 整型
        • 池化的 布尔
        • standby 整型
        • 开始 整型
      • 调用 整型

        在滚动 24 小时窗口中的执行指标。所有五个字段都是指针,以便线程可以区分用户界面需要以不同方式渲染的两种情况:(a) OE 指标获取失败(软失败 — 所有五个字段均不存在);或 (b) 窗口包含零调用 / 没有完成的执行(Invocations 设置为 0,延迟/速率字段不存在)。用户界面通过 Invocations != nil 来区分 “—” 与 “0次调用”。

      • 语言 字符串
      • last_invoked_at string(date-time)
      • metrics_computed_at string(date-time)
      • metrics_window_start string(date-time)
      • 名称 字符串
      • org_id 字符串
      • p95延迟 数字
      • PROJECT_ID 字符串
      • release_mode 字符串

        ReleaseMode 是 ECP 所有的 webhook 发布策略(“推送” | “标签发布” | “仅限 API”)。在每次详细信息 GET 请求时获取;当 ECP 没有值或无法访问时不存在。

      • 状态 字符串

        状态是 ECP 控制的活动/暂停状态信号。网关会在每次获取详细信息 GET 操作时从 ECP 获取它 — 它不会在本地持久存储。ECP 不可达时缺席;用户界面将缺席视为未暂停。

        取值为 active、paused、error、disconnected 或 deleting。

      • 子目录 字符串
      • updated_date 字符串
      • workspace_id 字符串
      • workspace_name 字符串
    隐藏响应属性 显示响应属性 对象
    • 总计 整型
    • workspaces 大量[对象]
      隐藏 workspaces 属性 显示 workspaces 属性 对象
      • aer_http_endpoint 字符串

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

      • 代理卡 对象
        隐藏 agent_card 属性 显示 agent_card 属性 对象
        • a2a_允许的调用者 array[string]

          A2AAllowedCallers 限制哪些工作区 ID 可以通过 A2A 调用此代理。空列表意味着允许任何调用者。

        • a2a_已启用 布尔

          A2AEnabled 控制此代理是否可被发现以响应 A2A 调用。

        • 功能 array[string]
        • input_modes array[string]

          InputModes 列出代理接受的 MIME 类型(例如:"text/plain", "应用程序/JSON")。

        • output_modes array[string]

          OutputModes 列出代理可以输出的 MIME 类型。

        • 技能 大量[对象]

          技能列出了代理可以执行的独立任务。

          隐藏技能属性 显示技能属性 对象
          • 描述 字符串
          • example_input 字符串
          • example_output 字符串
          • 名称 字符串
        • 总结 字符串
      • agent_grpc_endpoint 字符串
      • agent_http_endpoint 字符串

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

      • auto_deploy 布尔

        AutoDeploy 是 ECP 所有的针对每个应用的自动部署开关。ECP 所有,每次 detail GET 请求时获取(未持久存储在网关数据库中)。当 ECP 没有值或无法访问时,状态为不存在;用户界面将不存在状态视为关闭状态。

      • completion_rate 数字
      • created_date 字符串
      • current_deployment_id 字符串
      • current_payload_ref 字符串
      • 描述 字符串
      • 功能 对象
        隐藏功能属性 显示功能属性 对象
        • 护栏 布尔
        • 内存 布尔
        • Playground 布尔

          Playground 报告 Playground 用户界面是否已为工作区预配(空/真 = 已预配,当前行为)。当为 false 时,调用者直接使用 invoke API。

        • use_custom_parser 布尔

          UseCustomParser 在为 true 时,使 Gateway 只在调用流上发出代理的 output-parser 自定义事件(放弃平台帧)。在 agentengine 初始化时,从 agent.yaml 功能中加载并持久化。

      • 框架 字符串
      • github_installation_id 整型

        GithubInstallationID 是拥有该仓库的 Github 应用安装实例。ECP 所有,在每次详细信息 GET 请求时获取(不会持久存储在网关数据库中),因此,它对在此字段存在之前创建的工作区也有效。用户界面需要此功能,以便在编辑跟踪分支时列出存储库的分支。

      • gitops 对象
        隐藏 gitops 属性 显示 gitops 属性 对象
        • 分支 字符串
        • connection_ref 字符串
        • github_installation_id integer(int64)
        • manifest_path 字符串
        • provider 字符串
        • repo_url 字符串
      • id 字符串
      • 实例 对象

        实例显示工作区的实例数(活动、待机和启动),从工作区的 OE 单元实时获取。当 OE 无法访问或工作区未以池化方式运行时不存在(例如容器模式)。有意不暴露任何内部实现命名:这是一个面向客户的字段。

        隐藏实例属性 显示实例属性 对象
        • 活跃的 整型
        • 池化的 布尔
        • standby 整型
        • 开始 整型
      • 调用 整型

        在滚动 24 小时窗口中的执行指标。所有五个字段都是指针,以便线程可以区分用户界面需要以不同方式渲染的两种情况:(a) OE 指标获取失败(软失败 — 所有五个字段均不存在);或 (b) 窗口包含零调用 / 没有完成的执行(Invocations 设置为 0,延迟/速率字段不存在)。用户界面通过 Invocations != nil 来区分 “—” 与 “0次调用”。

      • 语言 字符串
      • last_invoked_at string(date-time)
      • metrics_computed_at string(date-time)
      • metrics_window_start string(date-time)
      • 名称 字符串
      • org_id 字符串
      • p95延迟 数字
      • PROJECT_ID 字符串
      • release_mode 字符串

        ReleaseMode 是 ECP 所有的 webhook 发布策略(“推送” | “标签发布” | “仅限 API”)。在每次详细信息 GET 请求时获取;当 ECP 没有值或无法访问时不存在。

      • 状态 字符串

        状态是 ECP 控制的活动/暂停状态信号。网关会在每次获取详细信息 GET 操作时从 ECP 获取它 — 它不会在本地持久存储。ECP 不可达时缺席;用户界面将缺席视为未暂停。

        取值为 active、paused、error、disconnected 或 deleting。

      • 子目录 字符串
      • updated_date 字符串
      • workspace_id 字符串
      • workspace_name 字符串
  • Bad Request

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

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

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
GET /api/v1/项目ID/工作区
curl \
 --request GET 'https://agentengine.mongodb.com/api/v1/projects/{id}/workspaces' \
 --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)
{
  "total": 42,
  "workspaces": [
    {
      "aer_http_endpoint": "string",
      "agent_card": {
        "a2a_allowed_callers": [
          "string"
        ],
        "a2a_enabled": true,
        "capabilities": [
          "string"
        ],
        "input_modes": [
          "string"
        ],
        "output_modes": [
          "string"
        ],
        "skills": [
          {
            "description": "string",
            "example_input": "string",
            "example_output": "string",
            "name": "string"
          }
        ],
        "summary": "string"
      },
      "agent_grpc_endpoint": "string",
      "agent_http_endpoint": "string",
      "auto_deploy": true,
      "completion_rate": 42.0,
      "created_date": "string",
      "current_deployment_id": "string",
      "current_payload_ref": "string",
      "description": "string",
      "features": {
        "guardrails": true,
        "memory": true,
        "playground": true,
        "use_custom_parser": true
      },
      "framework": "string",
      "github_installation_id": 42,
      "gitops": {
        "branch": "string",
        "connection_ref": "string",
        "github_installation_id": 42,
        "manifest_path": "string",
        "provider": "string",
        "repo_url": "string"
      },
      "id": "string",
      "instances": {
        "active": 42,
        "pooled": true,
        "standby": 42,
        "starting": 42
      },
      "invocations": 42,
      "language": "string",
      "last_invoked_at": "2026-05-04T09:42:00Z",
      "metrics_computed_at": "2026-05-04T09:42:00Z",
      "metrics_window_start": "2026-05-04T09:42:00Z",
      "name": "string",
      "org_id": "string",
      "p95_latency_ms": 42.0,
      "project_id": "string",
      "release_mode": "string",
      "status": "active",
      "subdirectory": "string",
      "updated_date": "string",
      "workspace_id": "string",
      "workspace_name": "string"
    }
  ]
}
响应示例 (200)
{
  "total": 42,
  "workspaces": [
    {
      "aer_http_endpoint": "string",
      "agent_card": {
        "a2a_allowed_callers": [
          "string"
        ],
        "a2a_enabled": true,
        "capabilities": [
          "string"
        ],
        "input_modes": [
          "string"
        ],
        "output_modes": [
          "string"
        ],
        "skills": [
          {
            "description": "string",
            "example_input": "string",
            "example_output": "string",
            "name": "string"
          }
        ],
        "summary": "string"
      },
      "agent_grpc_endpoint": "string",
      "agent_http_endpoint": "string",
      "auto_deploy": true,
      "completion_rate": 42.0,
      "created_date": "string",
      "current_deployment_id": "string",
      "current_payload_ref": "string",
      "description": "string",
      "features": {
        "guardrails": true,
        "memory": true,
        "playground": true,
        "use_custom_parser": true
      },
      "framework": "string",
      "github_installation_id": 42,
      "gitops": {
        "branch": "string",
        "connection_ref": "string",
        "github_installation_id": 42,
        "manifest_path": "string",
        "provider": "string",
        "repo_url": "string"
      },
      "id": "string",
      "instances": {
        "active": 42,
        "pooled": true,
        "standby": 42,
        "starting": 42
      },
      "invocations": 42,
      "language": "string",
      "last_invoked_at": "2026-05-04T09:42:00Z",
      "metrics_computed_at": "2026-05-04T09:42:00Z",
      "metrics_window_start": "2026-05-04T09:42:00Z",
      "name": "string",
      "org_id": "string",
      "p95_latency_ms": 42.0,
      "project_id": "string",
      "release_mode": "string",
      "status": "active",
      "subdirectory": "string",
      "updated_date": "string",
      "workspace_id": "string",
      "workspace_name": "string"
    }
  ]
}
响应示例 (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
}
响应示例 (500)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (500)
{
  "code": "string",
  "error": "string",
  "success": true
}