获取操作历史信息
更新时间: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 |
失败索引 |
请求示例
POST /api/bes/cluster/cluster_tasks
<公共请求头>
x-Region: bj
{
"clusterId":"807521220013723648"
}
响应示例
HTTP/1.1 200 OK
<公共响应头>
{
"result" : {
"appTasks" : [ {
"end_timestamp" : "1692098232160",
"start_timestamp" : "1692098199445",
"subTasks" : [ {
"end_timestamp" : "1692098232160",
"start_timestamp" : "1692098199445",
"progress" : 50,
"taskList" : [ {
"finishTime" : "1699264859155",
"level" : "1",
"name" : "clusterRemoteConnectSettingCheck",
"failedIndices" : [ "failedIndices", "failedIndices" ],
"type" : "cluster",
"message" : "cluster has no snapshot",
"status" : "1 通过;-1不通过"
}, {
"finishTime" : "1699264859155",
"level" : "1",
"name" : "clusterRemoteConnectSettingCheck",
"failedIndices" : [ "failedIndices", "failedIndices" ],
"type" : "cluster",
"message" : "cluster has no snapshot",
"status" : "1 通过;-1不通过"
} ],
"detail" : { },
"type" : "SCALE_IN",
"status" : "NOT_START/RUNNING/FAILED/FINISH"
}, {
"end_timestamp" : "1692098232160",
"start_timestamp" : "1692098199445",
"progress" : 50,
"taskList" : [ {
"finishTime" : "1699264859155",
"level" : "1",
"name" : "clusterRemoteConnectSettingCheck",
"failedIndices" : [ "failedIndices", "failedIndices" ],
"type" : "cluster",
"message" : "cluster has no snapshot",
"status" : "1 通过;-1不通过"
}, {
"finishTime" : "1699264859155",
"level" : "1",
"name" : "clusterRemoteConnectSettingCheck",
"failedIndices" : [ "failedIndices", "failedIndices" ],
"type" : "cluster",
"message" : "cluster has no snapshot",
"status" : "1 通过;-1不通过"
} ],
"detail" : { },
"type" : "SCALE_IN",
"status" : "NOT_START/RUNNING/FAILED/FINISH"
} ],
"progress" : 100,
"detail" : { },
"type" : "RESTART",
"status" : "NOT_START/RUNNING/FAILED/FINISH"
}, {
"end_timestamp" : "1692098232160",
"start_timestamp" : "1692098199445",
"subTasks" : [ {
"end_timestamp" : "1692098232160",
"start_timestamp" : "1692098199445",
"progress" : 50,
"taskList" : [ {
"finishTime" : "1699264859155",
"level" : "1",
"name" : "clusterRemoteConnectSettingCheck",
"failedIndices" : [ "failedIndices", "failedIndices" ],
"type" : "cluster",
"message" : "cluster has no snapshot",
"status" : "1 通过;-1不通过"
}, {
"finishTime" : "1699264859155",
"level" : "1",
"name" : "clusterRemoteConnectSettingCheck",
"failedIndices" : [ "failedIndices", "failedIndices" ],
"type" : "cluster",
"message" : "cluster has no snapshot",
"status" : "1 通过;-1不通过"
} ],
"detail" : { },
"type" : "SCALE_IN",
"status" : "NOT_START/RUNNING/FAILED/FINISH"
}, {
"end_timestamp" : "1692098232160",
"start_timestamp" : "1692098199445",
"progress" : 50,
"taskList" : [ {
"finishTime" : "1699264859155",
"level" : "1",
"name" : "clusterRemoteConnectSettingCheck",
"failedIndices" : [ "failedIndices", "failedIndices" ],
"type" : "cluster",
"message" : "cluster has no snapshot",
"status" : "1 通过;-1不通过"
}, {
"finishTime" : "1699264859155",
"level" : "1",
"name" : "clusterRemoteConnectSettingCheck",
"failedIndices" : [ "failedIndices", "failedIndices" ],
"type" : "cluster",
"message" : "cluster has no snapshot",
"status" : "1 通过;-1不通过"
} ],
"detail" : { },
"type" : "SCALE_IN",
"status" : "NOT_START/RUNNING/FAILED/FINISH"
} ],
"progress" : 100,
"detail" : { },
"type" : "RESTART",
"status" : "NOT_START/RUNNING/FAILED/FINISH"
} ],
"clusterId" : "clusterId"
},
"success" : "true",
"status" : 0
}
错误码
请参考通用错误码