跳转到内容
开发者文档 / 资源版本分支接口

获取版本分支分页

分页获取指定资源的版本分支,可按标签、发布类型、频道和适用版本筛选。

GET/api/resources/{resourceId}/releases

鉴权方式 请求头 Api-Key、Api-Secret

参数

位置参数类型必填默认值说明
pathresourceIdinteger是-资源 ID
querylabelstring否-版本标签搜索词
querytypestring否-CLIENT、SERVER、BOTH
querychannelstring否-RELEASE、PREVIEW、BETA、ALPHA
queryversionIdsinteger[]否-适用版本 ID,可重复传递
queryincludesstring否-关联信息:versions、cores、links,多个值用 ; 分隔
querypageinteger否1页码,最小为 1
queryperinteger否10每页数量,范围 10–200
bash
curl 'https://resource-api.xyeidc.com/api/resources/42/releases?type=CLIENT&channel=RELEASE&versionIds=419&includes=versions%3Bcores%3Blinks&page=1&per=10' \
  -H 'Api-Key: YOUR_API_KEY' \
  -H 'Api-Secret: YOUR_API_SECRET'

响应示例

json
{
  "code": 200,
  "msg": "Success!",
  "data": {
    "data": [
      {
        "id": 649,
        "uuid": "21e17bc8-b755-497b-a4cd-90cdb8ee51b3",
        "resourceId": 42,
        "label": "1.0.0",
        "type": "CLIENT",
        "channel": "RELEASE",
        "notes": "首个稳定版本",
        "fileUuid": null,
        "fileName": null,
        "fileType": null,
        "orderNum": 1000,
        "downloadCount": 0,
        "versions": [],
        "cores": [],
        "links": []
      }
    ],
    "perPage": 10,
    "currentPage": 1,
    "totalPages": 1,
    "count": 1
  }
}

当前分页接口只支持按版本 ID 关联筛选,不提供核心 ID 筛选参数。