获取文件
GET
/web/v1/files/query/{fileBizId}JWT + Turnstile通过业务 ID 获取单个文件的元数据。此接口不返回文件内容;如需下载文件内容,请使用下载相关接口。
鉴权
Auth Chain: WEB Chain — 需要
Authorization: Bearer <jwt>和 Turnstile token。 以下 header 由系统注入(前端无需处理):X-PORTAL-ACCESS-CODE(Nginx),X-Request-Id(Gateway)
请求参数
| Name | Type | Required | In | Description |
|---|---|---|---|---|
fileBizId | string | Yes | path | 文件业务 ID |
成功响应
成功200
{
"version": "1.3.0",
"timestamp": 1709337600000,
"success": true,
"code": "2000",
"message": "SUCCESS",
"data": {
"bizId": "file_abc123",
"bucket": "default",
"objectKey": "uploads/2026/03/21/file_abc123.pdf",
"originalFilename": "invoice.pdf",
"fileSize": 102400,
"contentType": "application/pdf",
"fileCategory": "DOCUMENT",
"fileStatus": "ACTIVE",
"etag": "d41d8cd98f00b204e9800998ecf8427e",
"remark": "Monthly invoice",
"createdAt": "2026-03-21T00:00:00Z",
"createdBy": "acc_user123"
}
}错误响应
Unauthorized401
{
"success": false,
"code": "4010",
"message": "Invalid or expired token"
}Not Found404
{
"success": false,
"code": "4040",
"message": "File not found"
}