获取构建
OpenAPI 契约
- 方法
- GET
- 路径
/api/v1/builds/{taskId}- 认证
- jwtBearer (bearer) OR automationKey (bearer)
- 响应状态
- 200 400 401 403 404 429 500
请求与响应 Schema
JSON
{
"requestBody": {},
"responses": {
"200": {
"description": "Build",
"content": {
"application/json": {
"$ref": "#/components/schemas/CompileTaskResponse"
}
}
},
"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_ 密钥读取一个构建或草稿。对于 project task,调用方必须对该项目拥有有效 build:read capability;legacy 或 ad-hoc task 使用 exact-owner fallback。任务表示会公开生命周期、进度、错误信息、生成 URL、托管路径、已解析配置,以及可用时的输出 metadata。该资源边界之外的任务不会被暴露。
对于已受理的提交或已启动的草稿,应访问返回的状态 URL,并遵循其重试指示后再轮询。GET 是安全的重试面:瞬时读取失败可重试,而重新提交 POST 可能创建第二个构建。成功、失败或取消后停止轮询;仅在输出可用后下载。