获取构建摘要

OpenAPI 契约

方法
GET
路径
/api/v1/builds/summary
认证
jwtBearer (bearer) OR automationKey (bearer)
响应状态
200 400 401 403 404 429 500
请求与响应 Schema
JSON
{
  "requestBody": {},
  "responses": {
    "200": {
      "description": "Build summary",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/CompileSummaryResponse"
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/RequestError"
        }
      }
    },
    "401": {
      "description": "Authentication required or invalid",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "403": {
      "description": "Authenticated but not permitted",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "404": {
      "description": "Requested build was not found",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    },
    "429": {
      "description": "HTTP rate limit or API-key NCU usage limit exceeded",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/RateLimitError"
        }
      }
    },
    "500": {
      "description": "Unexpected server error",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}

使用 JWT 或带 build:read 的 nfy_ 密钥获取已认证用户任务的汇总计数。摘要分开统计成功工作、失败工作(包含取消)、活跃待处理/运行中工作,以及总数。

将其用于紧凑的仪表板指标,而不是代替单个任务的列表或轮询。计数按所有者隔离,并反映服务当前记录,包括尚未被移除的草稿。