巡检历史:查询列表
更新时间 2024-09-25 16:21:01
最近更新时间: 2024-09-25 16:21:01
智能巡检
巡检历史:查询列表
接口功能介绍
调用此接口可查询巡检历史列表。
接口约束
资源池ID不为空。
URI
POST /v4/monitor/intelligent-inspection/query-history-list
路径参数
无
Query参数
无
请求参数
请求头header参数
无
请求体body参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| regionID | 是 | String | 资源池ID | 81f7728662dd11ec810800155d307d5b | |
| startTime | 否 | Integer | 查询起始时间戳,默认7天前 | 1667815639 | |
| endTime | 否 | Integer | 查询截止时间戳,默认当前时间 | 1667817639 | |
| pageNo | 否 | Integer | 页码,默认为1 | 1 | |
| pageSize | 否 | Integer | 页大小,默认为20 | 2 |
响应参数
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| statusCode | Integer | 返回状态码(800为成功,900为失败),默认值:800 | 800 | |
| errorCode | String | 失败时的错误代码,参见公共错误码说明 | ||
| message | String | 失败时的错误描述,一般为英文描述 | Success | |
| msgDesc | String | 失败时的错误描述,一般为中文描述 | 成功 | |
| error | String | 错误码,请求成功时,不返回该字段 | Openapi.Parameter.Error | |
| returnObj | Object | 返回参数,参考returnObj对象结构 | returnObj |
表 returnObj
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| inspectionHistoryList | Array of Objects | 巡检历史列表 | inspectionHistoryObj | |
| totalCount | Integer | 获取对象数据条数 | 2 | |
| totalPage | Integer | 总页数 | 1 | |
| currentCount | Integer | 当前页记录数 | 2 |
表 inspectionHistoryObj
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| taskID | String | 巡检任务ID | acd8b6b4610b97d202306301808 | |
| inspectionTime | Integer | 巡检时间,毫秒级。 | 1667815639000 | |
| inspectionScore | Integer | 巡检得分。 | 87 | |
| healthCount | Integer | 健康检查项数量 | 3 | |
| healthProblemCount | Integer | 问题数量 | 10 | |
| riskCount | Integer | 风险识别项数量 | 1 | |
| riskProblemCount | Integer | 风险数量 | 10 | |
| inspectionItemList | Array of Objects | 巡检项列表 | inspectionItemObj |
表 inspectionItemObj
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| productType | String | 本参数表示产品类型。取值范围:vm:云主机。根据以上范围取值。 | vm | |
| inspectionType | Integer | 本参数表示巡检类型。取值范围:1:资源健康评估。2:资源风险识别。根据以上范围取值。 | 1 | |
| inspectionItem | Integer | 本参数表示巡检项。取值范围:1:云主机性能评估。2:监控数据健康评估。3:云主机闲置资源检查。4:云主机磁盘使用预警评估根据以上范围取值。 | 1 | |
| level | Integer | 本参数表示重要等级。取值范围:1:低。2:中。3:高。根据以上范围取值。 | 2 | |
| description | String | 巡检项描述 | 云主机磁盘空间耗尽风险 | |
| inspectionResult | Boolean | 本参数表示巡检结果。取值范围:true:正常。false:异常。根据以上范围取值。 | true | |
| anomalyCount | Integer | 异常数量 | 10 |
请求示例
请求url
/v4/monitor/intelligent-inspection/query-history-list
请求头header
无
请求体body
{
"regionID": "81f7728662dd11ec810800155d307d5b",
"startTime": 1693262794,
"endTime": 1693272794
}
响应示例
{
"statusCode":800,
"errorCode":"",
"message":"Success",
"msgDesc":"成功",
"returnObj":{
"inspectionHistoryList":[
{
"taskID":"acd8b6b4610b97d202306301808",
"inspectionTime":1667815639000,
"inspectionScore":87,
"healthCount":3,
"healthProblemCount":10,
"riskCount":1,
"riskProblemCount":10,
"inspectionItemList":[
{
"productType":"vm",
"inspectionType":1,
"inspectionItem":1,
"level":2,
"description":"云主机性能评估",
"inspectionResult":true,
"anomalyCount":2
},
{
"productType":"vm",
"inspectionType":1,
"inspectionItem":2,
"level":2,
"description":"监控数据健康评估",
"inspectionResult":true,
"anomalyCount":5
}
]
}
],
"totalCount":1,
"currentCount":1,
"totalPage":1
}
}
状态码
| 状态码 | 描述 |
|---|---|
| 200 | 请求成功 |
错误码
| errorCode | 描述 |
|---|---|
| 其他 | 参见公共错误码说明 |