拉取多角色服务列表
更新时间:2026-10-21
接口描述
分页拉取当前账号、当前地域下的多角色服务(服务组)列表。
请求结构
Plain Text
1POST /?action=DescribeGroupServices
2HTTP/1.1
3Host:aihc.bj.baidubce.com
4Authorization: authorization string
5version: v2
6{
7 "pageNumber": 1,
8 "pageSize": 10,
9 "keyword": "string",
10 "orderBy": "createdAt",
11 "order": "desc"
12}
这个接口是 POST,参数放在请求体里。 请求体里没填的参数,也可以放在 URL 的查询串里,两处都有时以请求体为准。
请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 参数类型 | 是否必须 | 参数位置 | 参数说明 |
|---|---|---|---|---|
| pageNumber | Int | 否 | body | 页码,默认 1,必须大于等于 1 |
| pageSize | Int | 否 | body | 每页条数,默认 10,必须大于等于 1。实测传 100000 也被接受 |
| keyword | String | 否 | body | 按服务组名称模糊过滤 |
| orderBy | String | 否 | body | 排序字段,目前只支持 createdAt |
| order | String | 否 | body | 排序方式,asc 或 desc。必须和 orderBy 同时填写或同时不填 |
返回头域
除公共头域,无其它特殊头域。
返回参数
| 参数名称 | 类型 | 说明 |
|---|---|---|
| requestId | String | 唯一标识请求,用于日志排查 |
| totalCount | Int | 符合条件的服务组总数 |
| pageNumber | Int | 本次请求的页码 |
| pageSize | Int | 本次请求的每页条数 |
| serviceGroups | Array of ServiceGroupBrief | 服务组列表 |
请求示例
Plain Text
1POST /?action=DescribeGroupServices
2HTTP/1.1
3Host:aihc.bj.baidubce.com
4version: v2
5Authorization:authorization string
6{
7 "pageNumber": 1,
8 "pageSize": 10,
9 "keyword": "qwen3",
10 "orderBy": "createdAt",
11 "order": "desc"
12}
返回示例
Plain Text
1HTTP/1.1 200 OK
2
3{
4 "requestId": "174e6078-00d4-4b6f-b90f-63451cbcbe67",
5 "totalCount": 1,
6 "pageNumber": 1,
7 "pageSize": 10,
8 "serviceGroups": [
9 {
10 "id": "g-xxxxxxxxxxxx",
11 "groupName": "qwen3-32b-pd",
12 "resourcePoolId": "aihc-xxxxxxxxxxxx",
13 "resourcePoolType": "serverless",
14 "creator": "liushuai37",
15 "createdAt": 1792410249,
16 "updatedAt": 1792410249
17 }
18 ]
19}
评价此篇文章
