Inspecting Server View Vulnerabilities
Function
This API is used to query server vulnerabilities in the server view.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
GET /v5/{project_id}/vulnerability/host/hosts
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID, which is used to specify the project that an asset belongs to. After the project ID is configured, you can query assets in the project using the project ID. For details about how to obtain it, see Obtaining a Project ID. Constraints N/A Range The value can contain 1 to 256 characters. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| enterprise_project_id | No | String | Definition Enterprise project ID, which is used to filter assets in different enterprise projects. For details, see Obtaining an Enterprise Project ID. To query assets in all enterprise projects, set this parameter to all_granted_eps. Constraints You need to set this parameter only after the enterprise project function is enabled. Range The value can contain 1 to 256 characters. Default Value 0: default enterprise project. |
| limit | Yes | Integer | Definition Number of records displayed on each page. Constraints N/A Range Value range: 10 to 200 Default Value 10 |
| offset | Yes | Integer | Definition Offset, which specifies the start position of the record to be returned. Constraints N/A Range The value range is 0 to 2,000,000. Default Value N/A |
| asset_value | No | String | Definition Asset importance. Constraints N/A Range Default Value N/A |
| group_name | No | String | Definition Server group Constraints N/A Range The value can contain 1 to 64 characters. Default Value N/A |
| host_name | No | String | Definition Server name. Constraints N/A Range The value can contain 1 to 64 characters. Default Value N/A |
| public_ip | No | String | Definition EIP of the server Constraints N/A Range The value can contain 0 to 128 characters. Default Value N/A |
| private_ip | No | String | Definition Private IP address of the server Constraints N/A Range The value can contain 0 to 128 characters. Default Value N/A |
| severity_level | No | String | Definition Server Risk Level Constraints N/A Range Default Value N/A |
| handle_status | No | String | Definition Handling status of the server. Constraints N/A Range Default Value N/A |
| status | No | String | Definition Server contained in the vulnerability status. Constraints N/A Range Default Value N/A |
| cluster_id | No | String | Definition Cluster ID. Constraints N/A Range The value can contain 1 to 64 characters. Default Value N/A |
| host_id_list | No | String | Definition Server ID list. Use commas (,) to separate multiple server IDs. Constraints N/A Range The value can contain 0 to 1850 characters. Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token, which contains user identity and permissions. The token can be used for identity authentication when an API is called. For details about how to obtain the token, see Obtaining a User Token. Constraints N/A Range The value can contain 1 to 32,768 characters. Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total_num | Integer | Definition Total number. Range Minimum value: 0; maximum value: 2147483647 |
| data_list | Array of data_list objects | Definition Server information list |
| Parameter | Type | Description |
|---|---|---|
| host_id | String | Definition Server ID Range The value can contain 0 to 64 characters. |
| agent_id | String | Definition Agent ID Range The value can contain 0 to 64 characters. |
| host_name | String | Definition Server name. Range The value can contain 0 to 64 characters. |
| region_name | String | Definition Region. Range The value can contain 0 to 32 characters. |
| public_ip | String | Definition Server EIP. Range The value can contain 0 to 128 characters. |
| private_ip | String | Definition Server private IP address. Range 0 to 4,096 characters |
| group_id | String | Definition Server group ID. Range The value can contain 0 to 128 characters. |
| group_name | String | Definition Server group name. Range The value can contain 0 to 256 characters. |
| os_type | String | Definition OS type Range |
| asset_value | String | Definition Asset importance. Range The value can contain 0 to 32 characters. |
| scan_time | Long | Definition Last scanned Range Minimum value: 0; maximum value: 2^63-1 |
| severity_level | String | Definition Server risks Range The value can contain 0 to 32 characters. |
| score | Integer | Definition Server risk score Range The value range is 0 to 100. |
| version | String | Definition Server quota. Range The value can contain 0 to 64 characters. |
| handle_status | String | Definition Server quota. Range |
| vul_num_with_repair_priority_list | Array of vul_num_with_repair_priority_list objects | Definition Number of vulnerabilities with different fixing priorities |
| vul_ids_info | vul_ids_info object | Definition Vulnerability ID list of each vulnerability type |
| Parameter | Type | Description |
|---|---|---|
| repair_priority | String | Definition Vulnerability fixing priority. Range The value can contain 0 to 64 characters. |
| vul_num | Integer | Definition Number of vulnerabilities of this priority Range The value range is 0 to 2,147,483,647. |
| Parameter | Type | Description |
|---|---|---|
| linux_vul_id_list | Array of strings | Definition IDs of Linux vulnerabilities |
| windows_vul_id_list | Array of strings | Definition IDs of Windows vulnerabilities |
| webcms_vul_id_list | Array of strings | Definition IDs of Web-CMS vulnerabilities |
| app_vul_id_list | Array of strings | Definition IDs of application vulnerabilities |
| urgent_vul_id_list | Array of strings | Definition IDs of emergency vulnerabilities |
Example Requests
Query the list of vulnerable servers in the server view of the project whose ID is 2b31ed520xxxxxxebedb6e57xxxxxxxx.
GET https://{endpoint}/v5/2b31ed520xxxxxxebedb6e57xxxxxxxx/vulnerability/host/hosts?handle_status=unhandled&offset=0&limit=100&enterprise_project_id=all_granted_eps Example Responses
Status code: 200
Request succeeded.
{
"total_num" : 1,
"data_list" : [ {
"version" : "hss.version.premium",
"host_id" : "17300e07-da2a-4d74-87c5-b6fad8a18704",
"agent_id" : "5388b0d5f5c631e0584cbaad9d2e55ab77f1460fe9d9ffc90cfe578354411717",
"host_name" : "ecs-00896674",
"asset_value" : "common",
"scan_time" : 176153356425,
"os_type" : "Linux",
"private_ip" : "192.168.0.217",
"public_ip" : "100.93.7.22",
"region_name" : "cn-north-7",
"severity_level" : "Medium",
"score" : 73,
"vul_num_with_repair_priority_list" : [ {
"repair_priority" : "Critical",
"vul_num" : 0
}, {
"repair_priority" : "High",
"vul_num" : 4
}, {
"repair_priority" : "Medium",
"vul_num" : 12
}, {
"repair_priority" : "Low",
"vul_num" : 3
} ],
"vul_ids_info" : {
"linux_vul_id_list" : [ "EulerOS-SA-2025-1049", "EulerOS-SA-2025-1053", "EulerOS-SA-2025-1054", "EulerOS-SA-2025-1057" ],
"windows_vul_id_list" : [ "KB5053594" ],
"webcms_vul_id_list" : [ "HCVD-WEBCMS-2025-111111" ],
"app_vul_id_list" : [ "HCVD-APP-CVE-2025-24813" ],
"urgent_vul_id_list" : [ "URGENT-CVE-2021-44228" ]
},
"handle_status" : "unhandled"
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot