GET管理接口
查询项目文件库
按上传时间倒序分页。`search` 匹配文件名、文件 id 与 SHA-256。 `referenced_by` 列出下载链接引用了该文件的版本号(按直链路径匹配,与域名无关)。 API Key 需要 `files:read` 作用域。
URL
/api/v1/admin/projects/{projectKey}/files鉴权方式
需要管理员 JWT(Authorization: Bearer <token>)
请求参数
Path 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| projectKey | string | 是 | 项目主键 project_key(大小写不敏感) |
Query 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| limit | integer | 否 | 分页大小 |
| offset | integer | 否 | 分页偏移 |
| search | string | 否 | 关键字,不区分大小写的子串匹配。命中字段由各接口说明给出; 空串等同于不传。 |
| status | pending | ready | failed | 否 |
Header 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| Authorization | string | 是 | Bearer <管理员 JWT 或 API Key> |
该接口无需请求体。
响应示例
200 响应
{
"total": 0,
"data": [
{
"id": "k3v9q2m7x1ab",
"project_key": "verhub",
"filename": "Verhub-Setup-1.2.0.msi",
"size": 52428800,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"part_size": null,
"content_type": "application/x-msi",
"status": "ready",
"source": "upload",
"source_url": null,
"error": null,
"storage_backend_id": "local",
"storage_backend_name": "本机存储",
"path": "/f/verhub/k3v9q2m7x1ab/Verhub-Setup-1.2.0.msi",
"url": "https://cdn.verhub.example.com/f/verhub/k3v9q2m7x1ab/Verhub-Setup-1.2.0.msi",
"referenced_by": [
"1.2.0"
],
"created_at": 1760000000,
"updated_at": 1760000000
}
]
}GET
