列出工作区的推广

获取 /API/v1/项目/{ID}/工作区/{workspace_ID}/推广

返回针对此工作区域的促销历史,最新的在前。

路径参数

  • id 字符串 必需

    targetProjectId

  • workspace_id 字符串 必需

    目标工作区 ID

查询参数

  • limit 整型

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

    最小值为 1,最大值为 100。默认值为 20。

  • 偏移量 整型

    页面偏移 (0-10000,默认 0)

    最小值为 0,最大值为 10000。默认值为 0。

响应

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

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

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

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

        字段验证失败。

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

        字段及其验证失败。

        • 描述 字符串 必需

          人类可读验证失败。

        • 字段 字符串 必需

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

    • 详细信息 字符串 必需

      可读的错误详情。

    • 错误 整型 必需

      HTTP status code.

    • 错误代码 字符串 必需

      机器可读的错误码。

    • 参数 array[string]

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

    • 原因 字符串 必需

      HTTP 状态原因语句。

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

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

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

        字段验证失败。

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

        字段及其验证失败。

        • 描述 字符串 必需

          人类可读验证失败。

        • 字段 字符串 必需

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

    • 详细信息 字符串 必需

      可读的错误详情。

    • 错误 整型 必需

      HTTP status code.

    • 错误代码 字符串 必需

      机器可读的错误码。

    • 参数 array[string]

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

    • 原因 字符串 必需

      HTTP 状态原因语句。

  • 200

    正常

    隐藏响应属性 显示响应属性 对象
    • 推送 大量[对象]
      隐藏促销属性 显示促销属性 对象
      • created_at 字符串
      • failure_reason 字符串
      • finished_at 字符串
      • force 布尔
      • initiated_by 字符串
      • org_id 字符串
      • 促销 ID 字符串
      • source_build_id 字符串
      • 状态 字符串

        状态可以是待处理、复制中、就绪或失败之一。就绪和失败是终端结果;待处理和正在复制是可观察的非终端轮询状态。

        取值为 pending、copying、ready 或 failed。

      • target_build_id 字符串
      • target_project_id 字符串
      • target_workspace_id 字符串
    • 总计 整型
    隐藏响应属性 显示响应属性 对象
    • 推送 大量[对象]
      隐藏促销属性 显示促销属性 对象
      • created_at 字符串
      • failure_reason 字符串
      • finished_at 字符串
      • force 布尔
      • initiated_by 字符串
      • org_id 字符串
      • 促销 ID 字符串
      • source_build_id 字符串
      • 状态 字符串

        状态可以是待处理、复制中、就绪或失败之一。就绪和失败是终端结果;待处理和正在复制是可观察的非终端轮询状态。

        取值为 pending、copying、ready 或 failed。

      • target_build_id 字符串
      • target_project_id 字符串
      • target_workspace_id 字符串
    • 总计 整型
  • Bad Request

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

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

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

    请求过多

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

      再次尝试前等待时间(秒)

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

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

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

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
GET /api/v1/项目/{id}/工作区/{workspace_id}/推广
curl \
 --request GET 'https://agentengine.mongodb.com/api/v1/projects/{id}/workspaces/{workspace_id}/promotions' \
 --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)
{
  "promotions": [
    {
      "created_at": "string",
      "failure_reason": "string",
      "finished_at": "string",
      "force": true,
      "initiated_by": "string",
      "org_id": "string",
      "promotion_id": "string",
      "source_build_id": "string",
      "status": "pending",
      "target_build_id": "string",
      "target_project_id": "string",
      "target_workspace_id": "string"
    }
  ],
  "total": 42
}
响应示例 (200)
{
  "promotions": [
    {
      "created_at": "string",
      "failure_reason": "string",
      "finished_at": "string",
      "force": true,
      "initiated_by": "string",
      "org_id": "string",
      "promotion_id": "string",
      "source_build_id": "string",
      "status": "pending",
      "target_build_id": "string",
      "target_project_id": "string",
      "target_workspace_id": "string"
    }
  ],
  "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
}
响应示例 (404)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (404)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (429)
# Headers
Retry-After: string

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

# Payload
{
  "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
}