参数
| 位置 | 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| path | resourceId | integer | 是 | 资源 ID |
| path | resourceReleaseId | integer | 是 | 版本分支 ID |
| body | label | string | 建议是 | 版本标签 |
| body | type | string | 建议是 | CLIENT、SERVER、BOTH |
| body | channel | string | 否 | RELEASE、PREVIEW、BETA、ALPHA |
| body | notes | string | 否 | Markdown 版本说明 |
| body | orderNum | integer | 否 | 排序值 |
| body | versions | integer[] | 是 | 更新后的完整版本 ID 数组;清空时传 [] |
| body | cores | integer[] | 是 | 更新后的完整核心 ID 数组;清空时传 [] |
curl -X POST 'https://resource-api.xyeidc.com/api/resources/42/releases/649' \
-H 'Api-Key: YOUR_API_KEY' \
-H 'Api-Secret: YOUR_API_SECRET' \
-H 'Content-Type: application/json' \
-d '{
"label": "1.0.1",
"type": "CLIENT",
"channel": "RELEASE",
"notes": "修复已知问题",
"orderNum": 1000,
"versions": [419, 420],
"cores": [25]
}'
响应示例
{
"code": 200,
"msg": "Success!",
"data": {
"id": 649,
"resourceId": 42,
"label": "1.0.1",
"type": "CLIENT",
"channel": "RELEASE",
"notes": "修复已知问题",
"orderNum": 1000
}
}
此接口按完整状态更新基础字段和关联集合。为避免将字段写为 null 或意外移除关联,请提交希望保留的完整值。
与创建版本分支不同,此接口不处理 links 数组,不能通过提交 links 来替换或清空下载地址。请分别调用创建下载地址、更新下载地址或删除下载地址。创建和更新单条链接时,displayType 均为必填字段。
