GET /v1/files/{file_id}
根据文件 ID 获取单个文件的详细元数据信息。
请求头
| 头部 | 必选 | 说明 |
|---|---|---|
Authorization | 是 | Bearer <PAT> |
路径参数
| 参数 | 类型 | 必选 | 说明 |
|---|---|---|---|
file_id | string | 是 | 文件唯一标识(file_ 前缀) |
示例请求
示例响应
HTTP 200 OK响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
file_id | string | 文件唯一标识 |
filename | string | 原始文件名 |
size_bytes | integer | 文件大小(字节) |
mime_type | string | MIME 类型 |
purpose | string | 文件用途 |
status | string | 文件状态(ready 表示可用) |
metadata | object | 自定义元数据 |
created_at | string | 创建时间(ISO 8601) |
updated_at | string | 更新时间(ISO 8601) |
错误码
| HTTP | type | 触发条件 |
|---|---|---|
| 401 | authentication_error | 缺少或无效的认证令牌 |
| 404 | not_found_error | 指定 ID 的文件不存在 |