命令列表查询
更新时间:2026-07-28
描述
查询我的命令列表或公共命令列表。
OpenAPI Explorer
去调试
您可以在 OpenAPI Explorer 中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer 可以自动生成 SDK 代码示例。
请求结构
Plain Text
1POST /v{version}/ca/action/list?locale={locale}
2Host: ca.bj.baidubce.com
3Authorization: authorization string
4
5{
6 "pageNo": pageNo,
7 "pageSize": pageSize,
8 "sort": sort,
9 "ascending": ascending,
10 "action": {
11 "type": type,
12 "command": {
13 "scope": scope,
14 "name": name,
15 "type": type
16 },
17 "instanceType": instanceType
18 }
19}
请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
|---|---|---|---|---|
| version | String | 是 | URL参数 | API版本号,当前取值为1 |
| locale | String | 否 | Query参数 | 语言,默认 zh-CN |
| pageNo | Integer | 是 | RequestBody参数 | 页码 |
| pageSize | Integer | 是 | RequestBody参数 | 页大小 |
| sort | String | 否 | RequestBody参数 | 排序字段,可选值createTime(命令创建时间) |
| ascending | Boolean | 否 | RequestBody参数 | 是否升序,默认false |
| action | ActionFilter | 是 | RequestBody参数 | 命令过滤器 |
返回头域
除公共头域,无其它特殊头域。
返回参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| requestId | String | 请求id |
| code | String | 响应状态,成功为success |
| message | String | 错误信息 |
| success | Boolean | 请求是否处理成功 |
| result | ActionPage | 命令列表信息 |
请求示例
Plain Text
1POST /v1/ca/action/list?locale={locale}
2Host: ca.bj.baidubce.com
3Authorization: authorization string
4
5{
6 "action" : {
7 "type" : "COMMAND",
8 "command" : {
9 "scope" : "INDIVIDUAL",
10 "name" : "test"
11 }
12 },
13 "sort" : "createTime",
14 "ascending" : false,
15 "pageNo" : 1,
16 "pageSize" : 10
17}
返回示例
Plain Text
1200 Success
2
3{
4 "requestId" : "ca1316b5-3fab-4c91-aeac-ad51fd******",
5 "code" : "success",
6 "result" : {
7 "pageNo" : 1,
8 "pageSize" : 10,
9 "totalCount" : 1,
10 "data" : [ {
11 "id" : "c-4CtIumYWlo******",
12 "type" : "COMMAND",
13 "name" : "cmd_test_test",
14 "timeoutSecond" : 30,
15 "command" : {
16 "type" : "SHELL",
17 "content" : "ls",
18 "scope" : "INDIVIDUAL",
19 "enableParameter" : false,
20 "workDir" : "/home",
21 "user" : "root"
22 },
23 "createdTimestamp" : 1694672762000,
24 "updatedTimestamp" : 1694672762000
25 } ]
26 }
27}
评价此篇文章
