根据文件 ID 获取单个文件的详细元数据信息。
请求头
头部 | 必选 | 说明 |
| 是 |
|
路径参数
参数 | 类型 | 必选 | 说明 |
| string | 是 | 文件唯一标识( |
示例请求
curl -X GET "https://api.qoder.com.cn/api/v1/cloud/files/file_019e3bb8c1387743bf4ef115aae5acb1" \
-H "Authorization: Bearer $QODER_PAT"
示例响应
HTTP 200 OK
{
"created_at": "2026-05-18T15:33:44Z",
"file_id": "file_019e3bb8c1387743bf4ef115aae5acb1",
"filename": "qoder-test-upload.txt",
"metadata": {},
"mime_type": "text/plain",
"purpose": "session_resource",
"size_bytes": 110,
"status": "ready",
"updated_at": "2026-05-18T15:33:44Z"
}
响应字段
字段 | 类型 | 说明 |
| string | 文件唯一标识 |
| string | 原始文件名 |
| integer | 文件大小(字节) |
| string | MIME 类型 |
| string | 文件用途 |
| string | 文件状态( |
| object | 自定义元数据 |
| string | 创建时间(ISO 8601) |
| string | 更新时间(ISO 8601) |
错误码
HTTP | type | 触发条件 |
401 |
| 缺少或无效的认证令牌 |
404 |
| 指定 ID 的文件不存在 |
错误响应示例:
{
"type": "error",
"error": {
"type": "not_found_error",
"message": "File 'file_nonexistent123' was not found."
}
}
完整错误信封说明详见 错误参考。
该文章对您有帮助吗?