PATCH管理接口
更新版本
修改版本字段,支持 latest/preview/published_at。
URL
/api/v1/admin/projects/{projectKey}/versions/{id}鉴权方式
需要管理员 JWT 或 API Key,二者等价(Authorization: Bearer <token>)
请求参数
Path 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| projectKey | string | 是 | 项目主键 project_key(大小写不敏感) |
| id | string | 是 | 记录主键 id |
Header 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| Authorization | string | 是 | Bearer <管理员 JWT 或 API Key> |
请求体
{
"title": "稳定版-修订",
"content": "补充发布说明。",
"is_latest": true,
"is_deprecated": false
}响应示例
200 响应
{
"id": "ver-001",
"version": "1.0.0",
"comparable_version": "1.0.0",
"title": "首发版本",
"content": "首个正式版本,支持版本发布与公告推送。",
"download_url": "https://example.com/download/verhub-1.0.0.zip",
"download_links": [
{
"url": "https://example.com/download/verhub-1.0.0.zip",
"name": "Windows 包",
"platform": "windows"
}
],
"forced": false,
"is_latest": true,
"is_preview": false,
"is_milestone": true,
"is_deprecated": false,
"platform": "windows",
"platforms": [
"windows",
"mac"
],
"custom_data": {
"channel": "stable"
},
"created_at": 1760000000,
"published_at": 1760000000
}PATCH
