获取操作历史信息
更新时间:2025-02-10
请求URI
POST /api/bes/cluster/cluster_tasks
请求头参数
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
x-Region | String | 否 | 区域 | bj |
请求体参数
请求体字段数据结构说明
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
clusterId | String | 是 | 集群id,超过规定18位会返回500错误 | 807521220013723648 |
响应体参数
响应体字段数据结构说明
参数名称 | 参数类型 | 描述 | 示例值 |
---|---|---|---|
success | String | 请求是否成功 | true |
status | Integer | 状态码 | |
result | Result |
Result字段数据结构说明
参数名称 | 参数类型 | 描述 | 示例值 |
---|---|---|---|
clusterId | String | 集群id | |
appTasks | List |
主任务列表 |
AppTasksItem字段数据结构说明
参数名称 | 参数类型 | 描述 | 示例值 |
---|---|---|---|
subTasks | List |
子任务列表 | |
type | String | 主任务类型 | RESTART |
detail | Detail | 主任务详情 | |
progress | Integer | 主任务进度 | 100 |
status | String | 主任务状态 | NOT_START/RUNNING/FAILED/FINISH |
start_timestamp | String | 主任务开始时间戳 | 1692098199445 |
end_timestamp | String | 主任务结束时间戳 | 1692098232160 |
SubTasksItem字段数据结构说明
参数名称 | 参数类型 | 描述 | 示例值 |
---|---|---|---|
type | String | 子任务类型 | SCALE_IN |
detail | Detail | 子任务详情 | |
progress | BigDecimal | 子任务进度 | 50 |
status | String | 子任务状态 | NOT_START/RUNNING/FAILED/FINISH |
taskList | List |
||
start_timestamp | String | 子任务开始时间戳 | 1692098199445 |
end_timestamp | String | 子任务结束时间戳 | 1692098232160 |
TaskListItem字段数据结构说明
参数名称 | 参数类型 | 描述 | 示例值 |
---|---|---|---|
name | String | 检查项名称 | clusterRemoteConnectSettingCheck |
type | String | 类型 | cluster |
level | String | 级别 | 1 |
status | String | 状态 | 1 通过;-1不通过 |
finishTime | String | 结束时间 | 1699264859155 |
message | String | 提示 | cluster has no snapshot |
failedIndices | List |
失败索引 |
请求示例
Plain Text
1POST /api/bes/cluster/cluster_tasks
2<公共请求头>
3x-Region: bj
4
5
6{
7 "clusterId":"807521220013723648"
8}
响应示例
Plain Text
1HTTP/1.1 200 OK
2<公共响应头>
3
4{
5 "result" : {
6 "appTasks" : [ {
7 "end_timestamp" : "1692098232160",
8 "start_timestamp" : "1692098199445",
9 "subTasks" : [ {
10 "end_timestamp" : "1692098232160",
11 "start_timestamp" : "1692098199445",
12 "progress" : 50,
13 "taskList" : [ {
14 "finishTime" : "1699264859155",
15 "level" : "1",
16 "name" : "clusterRemoteConnectSettingCheck",
17 "failedIndices" : [ "failedIndices", "failedIndices" ],
18 "type" : "cluster",
19 "message" : "cluster has no snapshot",
20 "status" : "1 通过;-1不通过"
21 }, {
22 "finishTime" : "1699264859155",
23 "level" : "1",
24 "name" : "clusterRemoteConnectSettingCheck",
25 "failedIndices" : [ "failedIndices", "failedIndices" ],
26 "type" : "cluster",
27 "message" : "cluster has no snapshot",
28 "status" : "1 通过;-1不通过"
29 } ],
30 "detail" : { },
31 "type" : "SCALE_IN",
32 "status" : "NOT_START/RUNNING/FAILED/FINISH"
33 }, {
34 "end_timestamp" : "1692098232160",
35 "start_timestamp" : "1692098199445",
36 "progress" : 50,
37 "taskList" : [ {
38 "finishTime" : "1699264859155",
39 "level" : "1",
40 "name" : "clusterRemoteConnectSettingCheck",
41 "failedIndices" : [ "failedIndices", "failedIndices" ],
42 "type" : "cluster",
43 "message" : "cluster has no snapshot",
44 "status" : "1 通过;-1不通过"
45 }, {
46 "finishTime" : "1699264859155",
47 "level" : "1",
48 "name" : "clusterRemoteConnectSettingCheck",
49 "failedIndices" : [ "failedIndices", "failedIndices" ],
50 "type" : "cluster",
51 "message" : "cluster has no snapshot",
52 "status" : "1 通过;-1不通过"
53 } ],
54 "detail" : { },
55 "type" : "SCALE_IN",
56 "status" : "NOT_START/RUNNING/FAILED/FINISH"
57 } ],
58 "progress" : 100,
59 "detail" : { },
60 "type" : "RESTART",
61 "status" : "NOT_START/RUNNING/FAILED/FINISH"
62 }, {
63 "end_timestamp" : "1692098232160",
64 "start_timestamp" : "1692098199445",
65 "subTasks" : [ {
66 "end_timestamp" : "1692098232160",
67 "start_timestamp" : "1692098199445",
68 "progress" : 50,
69 "taskList" : [ {
70 "finishTime" : "1699264859155",
71 "level" : "1",
72 "name" : "clusterRemoteConnectSettingCheck",
73 "failedIndices" : [ "failedIndices", "failedIndices" ],
74 "type" : "cluster",
75 "message" : "cluster has no snapshot",
76 "status" : "1 通过;-1不通过"
77 }, {
78 "finishTime" : "1699264859155",
79 "level" : "1",
80 "name" : "clusterRemoteConnectSettingCheck",
81 "failedIndices" : [ "failedIndices", "failedIndices" ],
82 "type" : "cluster",
83 "message" : "cluster has no snapshot",
84 "status" : "1 通过;-1不通过"
85 } ],
86 "detail" : { },
87 "type" : "SCALE_IN",
88 "status" : "NOT_START/RUNNING/FAILED/FINISH"
89 }, {
90 "end_timestamp" : "1692098232160",
91 "start_timestamp" : "1692098199445",
92 "progress" : 50,
93 "taskList" : [ {
94 "finishTime" : "1699264859155",
95 "level" : "1",
96 "name" : "clusterRemoteConnectSettingCheck",
97 "failedIndices" : [ "failedIndices", "failedIndices" ],
98 "type" : "cluster",
99 "message" : "cluster has no snapshot",
100 "status" : "1 通过;-1不通过"
101 }, {
102 "finishTime" : "1699264859155",
103 "level" : "1",
104 "name" : "clusterRemoteConnectSettingCheck",
105 "failedIndices" : [ "failedIndices", "failedIndices" ],
106 "type" : "cluster",
107 "message" : "cluster has no snapshot",
108 "status" : "1 通过;-1不通过"
109 } ],
110 "detail" : { },
111 "type" : "SCALE_IN",
112 "status" : "NOT_START/RUNNING/FAILED/FINISH"
113 } ],
114 "progress" : 100,
115 "detail" : { },
116 "type" : "RESTART",
117 "status" : "NOT_START/RUNNING/FAILED/FINISH"
118 } ],
119 "clusterId" : "clusterId"
120 },
121 "success" : "true",
122 "status" : 0
123}
错误码
请参考通用错误码