分页查询版本列表(扩展)
1. 接口定位
- 接口名称: 分页查询版本列表(扩展)
- 所属域: admin/application
- 业务目标: 在 AdminX 扩展后台域下提供分页查询能力,用于扩展后台业务编排
2. 请求定义
- Method:
POST - Path:
/adminx/application/page_versions - Content-Type: 推荐
application/json - operationID: 必填,请通过 Header
operationID传入 - 鉴权: 需要 Header
token,且必须是管理员 token - 幂等性: 幂等
3. 请求参数
Header 参数
| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| operationID | 是 | string | 链路追踪 ID |
| token | 是 | string | 管理员 token |
Body 参数
| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| platform | 否 | array<string> | 平台过滤列表;为空时不过滤平台 |
| pagination | 是 | object | 分页参数 |
pagination 字段
| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| pageNumber | 是 | int32 | 页码,从 1 开始 |
| showNumber | 是 | int32 | 每页条数,大于 0 |
4. 响应结构
通用响应包裹
| 字段 | 类型 | 说明 |
|---|---|---|
| errCode | int | 错误码,0 表示成功 |
| errMsg | string | 错误简述 |
| errDlt | string | 错误详情 |
| data | object | 业务数据 |
data 字段
| 字段 | 类型 | 说明 |
|---|---|---|
| total | int64 | 命中的版本总数 |
| versions | array<object> | 当前页版本列表 |
versions 元素字段
| 字段 | 类型 | 说明 |
|---|---|---|
| id | string | 版本记录 ID |
| platform | string | 平台标识 |
| version | string | 版本号 |
| url | string | 下载地址 |
| text | string | 版本说明 |
| force | bool | 是否强制升级 |
| latest | bool | 是否标记为最新 |
| hot | bool | 是否热更 |
| createTime | int64 | 创建时间,Unix 毫秒时间戳 |
| downloadCount | int64 | 下载量累计 |
| installCount | int64 | 安装量累计 |
与 Admin 主域差异
- 相比 分页查询版本列表(Admin 主域接口),该接口额外返回
downloadCount与installCount两个统计字段。
5. 业务规则
- 该入口由 AdminX 路由分组统一暴露,属于扩展后台域接口。
- 统计与排序逻辑与标准版本列表接口一致。
- AdminX 的定位是扩展后台能力域,不是 Admin 主域兼容副本。
- 若需要 Admin 主域基础接口,请使用: 分页查询版本列表(Admin 主域接口)。
6. 示例
fetch 请求示例
javascript
fetch("http://localhost:10011/adminx/application/page_versions", {
method: "POST",
headers: {
operationID: "550e8400-e29b-41d4-a716-446655440705",
token: "eyJhbGciOi...",
"Content-Type": "application/json",
},
body: JSON.stringify({
platform: ["ios", "android"],
pagination: {
pageNumber: 1,
showNumber: 20,
},
}),
})
.then((res) => res.json())
.then((data) => console.log(data));成功响应示例
json
{
"errCode": 0,
"errMsg": "",
"errDlt": "",
"data": {
"total": 2,
"versions": [
{
"id": "67ea5ef1b9f35d6a63717811",
"platform": "ios",
"version": "1.2.0",
"url": "https://example.com/downloads/openim-ios-1.2.0.ipa",
"text": "bug fixes and performance improvements",
"force": false,
"latest": true,
"hot": false,
"createTime": 1767225600000,
"downloadCount": 12834,
"installCount": 9231
}
]
}
}7. 变更记录
- 2026-04-08: 新增 AdminX 扩展后台接口文档,明确与 Admin 主域边界。