# Query the last inspection result of an inspection object
Description
You can call this operation to query the latest inspection result of an inspection object based on the inspection object type, inspection scenario, and inspection object ID (optional).
Call description
Prerequisites
You have passed the authentication for the OceanBase Cloud Platform (OCP) application service.
Request path
GET api/v2/inspection/report/info
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| tagId | Long | Yes | 1 | The ID of the inspection scenario. Valid values: 1: indicates basic inspection.2: indicates performance inspection.3: indicates in-depth inspection.4: indicates installation inspection. |
| objectType | String | Yes | OB_CLUSTER | The type of the inspection object. Valid values: OB_CLUSTER: indicates an OceanBase cluster.OB_TENANT: indicates an OceanBase Database tenant.HOST: indicates a host.OB_PROXY: indicates an OBProxy. |
| objectId | Long | No | 1 | The ID of the inspection object. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | The requested business data. |
| ├─ contents | Array | The inspection result. For more information, see Data structure of InspectionReportAggrInfo. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Data structure of InspectionReportAggrInfo
| Parameter | Type | Description |
|---|---|---|
| reportId | Long | The ID of the inspection report. |
| objectId | Long | The ID of the inspection object. |
| objectName | String | The name of the inspection object. |
| objectType | String | The type of the inspection object. |
| tag | Object | The inspection scenario. |
| ├─ id | Long | The ID of the inspection scenario. |
| ├─ name | String | The name of the inspection scenario. |
| ├─ description | String | The description of the inspection scenario |
| ├─ configType | String | The configuration type of the inspection scenario. |
| startTime | Datetime | The inspection start time. |
| endTime | Datetime | The inspection end time. |
| resultList | Array | The inspection result of the inspection item. |
| ├─ itemId | Long | The ID of the inspection item. |
| ├─ name | String | The name of the inspection item. |
| ├─ description | String | The description of the inspection item. |
| ├─ reportItems | Array | The details of the inspection result of the inspection item. |
| ├─ itemId | Long | The ID of the inspection item. |
| ├─ key | String | The key of the inspection item. |
| ├─ value | String | The value of the inspection item. |
| ├─ rawValue | String | The original value of the inspection item. |
| ├─ target | String | The inspection target. |
| ├─ level | String | The risk level. Valid values: HIGH, MEDIUM, and LOW. |
| ├─ rules | Array | The inspection rules. |
| ├─ level | String | The risk level. |
| ├─ validator | String | The value range of the corresponding risk level. |
Examples
Sample request
Query the result of the latest basic inspection of the inspection object with the ID 3 for the cluster.
GET api/v2/inspection/report/info?objectType=OB_CLUSTER&tagId=1&objectId=3
Sample response
{
"data": {
"contents": [
{
"endTime": "2024-08-26T11:38:34+08:00",
"itemResults": [
{
"description": "Connect to the sys tenant to check whether the cluster can be connected",
"itemId": 1,
"name": "Cluster connectivity",
"reportItems": [
{
"itemId": 1,
"rawValue": "pass",
"target": "admin",
"value": "pass"
}
],
"rules": [
{
"level": "HIGH",
"validator": "!{pass}"
}
]
},
{
"description": "Check the status of each OBServer node in the cluster",
"itemId": 2,
"name": "OBServer node status",
"reportItems": [
{
"itemId": 2,
"key": "xxx.xxx.xxx.xxx",
"rawValue": "active",
"target": "admin",
"value": "active"
}
],
"rules": [
{
"level": "HIGH",
"validator": "{inactive}"
},
{
"level": "LOW",
"validator": "{deleting,stopped}"
}
]
}
],
"objectId": 3,
"objectName": "admin",
"objectType": "OB_CLUSTER",
"reportId": 75,
"startTime": "2024-08-26T11:38:32+08:00",
"tag": {
"configType": "BUILTIN",
"description": "Check the status of resources managed by OCP, such as the status of clusters and replicas. You can perform this check in routine inspections." ,
"id": 1,
"name": "Basic inspection"
}
}
]
},
"duration": 86,
"server": "b3b6d90167",
"status": 200,
"successful": true,
"timestamp": "2024-08-27T16:45:12.302+08:00",
"traceId": "a14676a7a0c556ec"
}