发布 /api/v1/项目/{id}/执行/{execution_id}/恢复

恢复已暂停的执行(例如,在人工审核批准之后)。项目范围由路由 ID 路径参数传递,组织来自该项目。

路径参数

  • id 字符串 必需

    项目 ID

  • execution_id 字符串 必需

    执行 ID

查询参数

  • workspace_id 字符串

    用于工作区解析的工作区 ID

application/json

body 必需

恢复有效负载

  • 决策 字符串 必需
  • reviewer_notes 字符串
  • 暂停生成 整型

    SuspendGeneration 将决策固定到审核人所看到的暂停快照(来自执行的 suspend_generation)。OE 在当前暂停状态不同时,会因冲突而拒绝简历,因此,审查人从未看到的内容从未获得批准查看。

    最小值为 0。

响应

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

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

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

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

        字段验证失败。

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

        字段及其验证失败。

        • 描述 字符串 必需

          人类可读验证失败。

        • 字段 字符串 必需

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

    • 详细信息 字符串 必需

      可读的错误详情。

    • 错误 整型 必需

      HTTP status code.

    • 错误代码 字符串 必需

      机器可读的错误码。

    • 参数 array[string]

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

    • 原因 字符串 必需

      HTTP 状态原因语句。

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

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

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

        字段验证失败。

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

        字段及其验证失败。

        • 描述 字符串 必需

          人类可读验证失败。

        • 字段 字符串 必需

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

    • 详细信息 字符串 必需

      可读的错误详情。

    • 错误 整型 必需

      HTTP status code.

    • 错误代码 字符串 必需

      机器可读的错误码。

    • 参数 array[string]

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

    • 原因 字符串 必需

      HTTP 状态原因语句。

  • 200

    正常

    隐藏响应属性 显示响应属性 对象
    • 错误 字符串
    • execution_id 字符串
    • 状态 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 错误 字符串
    • execution_id 字符串
    • 状态 字符串
    • Success 布尔
  • Bad Request

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

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

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

    冲突

    隐藏响应属性 显示响应属性 对象
    • blocking_execution_id 字符串
    • blocking_status 字符串
    • 代码 字符串
    • 错误 字符串
    • last_activity_at 字符串
    隐藏响应属性 显示响应属性 对象
    • blocking_execution_id 字符串
    • blocking_status 字符串
    • 代码 字符串
    • 错误 字符串
    • last_activity_at 字符串
  • 第 422 章

    PROJECT_SECRET_INVALID: 工作区无法启动,因为项目密钥无效或无法访问(修复密钥并重新部署)

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

    ResumeExecutionResponse、StartupFailureResponse,用于 AGENT_STARTUP_FAILED/STARTUP_FAILED 启动失败;或 ErrorResponse,用于工作流分支激活失败

    以下任何一项:
    以下任何一项:
  • 502

    错误网关

    隐藏响应属性 显示响应属性 对象
    • 错误 字符串
    • execution_id 字符串
    • 状态 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 错误 字符串
    • execution_id 字符串
    • 状态 字符串
    • Success 布尔
  • 503

    启动失败响应,适用于 POOL_EXHAUSTED/EXECUTOR_BOOT_FAILED/PLATFORM_DEPENDENCY_FAILED/POOL_UNREACHABLE 启动失败;否则为错误响应。POOL_EXHAUSTED 包含 Retry-After 头部

    隐藏头部属性 显示标头属性
    • Retry-After 字符串

      重试前等待秒数(仅限 POOL_EXHAUSTED)

    以下任何一项:
    以下任何一项:
  • 网关超时

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
POST /api/v1/项目/{id}/执行/{execution_id}/恢复
curl \
 --request POST 'https://agentengine.mongodb.com/api/v1/projects/{id}/executions/{execution_id}/resume' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{
  "decision": "approved",
  "reviewer_notes": "Reviewed and approved.",
  "suspend_generation": 1
}'
请求示例
{
  "decision": "approved",
  "reviewer_notes": "Reviewed and approved.",
  "suspend_generation": 1
}
响应示例 (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)
{
  "error": "string",
  "execution_id": "string",
  "status": "string",
  "success": true
}
响应示例 (200)
{
  "error": "string",
  "execution_id": "string",
  "status": "string",
  "success": true
}
响应示例 (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
}
响应示例 (404)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (404)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (409)
{
  "blocking_execution_id": "string",
  "blocking_status": "string",
  "code": "string",
  "error": "string",
  "last_activity_at": "string"
}
响应示例 (409)
{
  "blocking_execution_id": "string",
  "blocking_status": "string",
  "code": "string",
  "error": "string",
  "last_activity_at": "string"
}
响应示例 (422)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (422)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (500)
{
  "error": "string",
  "execution_id": "string",
  "status": "string",
  "success": true
}
{
  "boot_id": "string",
  "code": "string",
  "component": "string",
  "error": "string",
  "execution_id": "string",
  "sandbox": "string",
  "source": "string",
  "success": true
}
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (500)
{
  "error": "string",
  "execution_id": "string",
  "status": "string",
  "success": true
}
{
  "boot_id": "string",
  "code": "string",
  "component": "string",
  "error": "string",
  "execution_id": "string",
  "sandbox": "string",
  "source": "string",
  "success": true
}
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (502)
{
  "error": "string",
  "execution_id": "string",
  "status": "string",
  "success": true
}
响应示例 (502)
{
  "error": "string",
  "execution_id": "string",
  "status": "string",
  "success": true
}
响应示例 (503)
# Headers
Retry-After: string

# Payload
{
  "boot_id": "string",
  "code": "string",
  "component": "string",
  "error": "string",
  "execution_id": "string",
  "sandbox": "string",
  "source": "string",
  "success": true
}
# Headers
Retry-After: string

# Payload
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (503)
# Headers
Retry-After: string

# Payload
{
  "boot_id": "string",
  "code": "string",
  "component": "string",
  "error": "string",
  "execution_id": "string",
  "sandbox": "string",
  "source": "string",
  "success": true
}
# Headers
Retry-After: string

# Payload
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (504)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (504)
{
  "code": "string",
  "error": "string",
  "success": true
}