下载构建制品
OpenAPI 契约
- 方法
- GET
- 路径
/api/v1/builds/{taskId}/download- 认证
- jwtBearer (bearer) OR automationKey (bearer)
- 响应状态
- 200 400 401 403 404 429 500
请求与响应 Schema
JSON
{
"requestBody": {},
"responses": {
"200": {
"description": "Build artifact",
"content": {
"application/octet-stream": {
"format": "binary",
"type": "string"
}
}
},
"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 或带 artifact:read 的 nfy_ 密钥下载私有构建输出;仅有 build:read 不足。服务还会授权确切任务,再以附件形式提供已编译输出的文件名。项目任务需要有效的 artifact:output:read;旧版或临时任务使用精确所有者回退。
输出存在前制品不可用,保留清理或任务删除后也可能消失。任务不存在或未获授权、构建尚未完成,或存储已经清理时,都不会得到可用文件。请在基于权益的保留期结束前,将发布副本保存到服务外部。