下载构建输入
OpenAPI 契约
- 方法
- GET
- 路径
/api/v1/builds/{taskId}/input- 认证
- jwtBearer (bearer)
- 响应状态
- 200 400 401 403 404 429 500
请求与响应 Schema
JSON
{
"requestBody": {},
"responses": {
"200": {
"description": "Build input archive",
"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"
}
}
}
}
}GET /api/v1/builds/{taskId}/input 仅接受 JWT。对于 project task,调用方必须拥有有效 artifact:input:read capability;只有 artifact:output:read 不能读取 source。legacy 或 ad-hoc task 使用 exact-owner fallback。automation key 不能下载构建输入,因为 API-key scope catalog 有意只授予 output access。
响应是使用原始 input filename 的 application/octet-stream attachment,并带有 Cache-Control: private, no-store。调用方 resource boundary 之外的任务以及已经删除的 input 都不会暴露。请将下载输入视为私有 source artifact。
http
GET /api/v1/builds/{taskId}/input
Authorization: Bearer <token>