Querying the Servers Affected by a Vulnerability
Function
This API is used to query the servers affected by a vulnerability.
Calling Method
For details, see Calling APIs.
URI
GET /v5/{project_id}/vulnerability/hosts
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant ID Minimum: 1 Maximum: 256 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
Enterprise user ID. To query all enterprise projects, set this parameter to all_granted_eps. Minimum: 0 Maximum: 128 |
vul_id |
Yes |
String |
Vulnerability ID Minimum: 0 Maximum: 64 |
type |
Yes |
String |
Vulnerability type
Minimum: 0 Maximum: 64 |
host_name |
No |
String |
Affected asset name Minimum: 0 Maximum: 256 |
host_ip |
No |
String |
IP address of the affected asset Minimum: 0 Maximum: 128 |
status |
No |
String |
Vulnerability status.
Minimum: 0 Maximum: 128 |
limit |
No |
Integer |
Number of records on each page Minimum: 10 Maximum: 200 Default: 10 |
offset |
No |
Integer |
Offset Minimum: 0 Maximum: 2000000 Default: 0 |
asset_value |
No |
String |
Asset importance important common test Minimum: 0 Maximum: 32 |
group_name |
No |
String |
Server group name Minimum: 0 Maximum: 256 |
handle_status |
No |
String |
description: |- Handling status. The options are as follows: - unhandled - handled Minimum: 1 Maximum: 32 |
severity_level |
No |
String |
Risk level. The value can be Critical, High, Medium, or Low. Minimum: 0 Maximum: 32 |
is_affect_business |
No |
Boolean |
Indicates whether services are affected. The value can be y or n. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
x-auth-token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. Minimum: 1 Maximum: 32768 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total_num |
Integer |
Number of affected servers Minimum: 0 Maximum: 10000 |
data_list |
Array of VulHostInfo objects |
Number of affected servers Array Length: 1 - 10000 |
Parameter |
Type |
Description |
---|---|---|
host_id |
String |
Server ID Minimum: 1 Maximum: 128 |
severity_level |
String |
Risk level.
Minimum: 1 Maximum: 128 |
host_name |
String |
Affected asset name Minimum: 1 Maximum: 256 |
host_ip |
String |
IP address of the affected asset Minimum: 1 Maximum: 256 |
agent_id |
String |
The corresponding agent ID of the server Minimum: 1 Maximum: 128 |
cve_num |
Integer |
Vulnerability CVEs Minimum: 0 Maximum: 10000 |
cve_id_list |
Array of strings |
CVE list Minimum: 1 Maximum: 64 Array Length: 1 - 10000 |
status |
String |
Vulnerability status.
Minimum: 1 Maximum: 128 |
repair_cmd |
String |
Repair command Minimum: 1 Maximum: 256 |
app_path |
String |
Path of the application software (This field is available only for application vulnerabilities.) Minimum: 1 Maximum: 512 |
region_name |
String |
Region Minimum: 0 Maximum: 128 |
public_ip |
String |
Server public IP address Minimum: 0 Maximum: 128 |
private_ip |
String |
Server private IP address Minimum: 0 Maximum: 128 |
group_id |
String |
Server group ID Minimum: 0 Maximum: 128 |
group_name |
String |
Server group name Minimum: 0 Maximum: 256 |
os_type |
String |
Operating system (OS) Minimum: 0 Maximum: 32 |
asset_value |
String |
Asset importance. The options are as follows:
Minimum: 0 Maximum: 32 |
is_affect_business |
Boolean |
Whether services are affected |
first_scan_time |
Long |
First scan time Minimum: 0 Maximum: 9223372036854775807 |
scan_time |
Long |
Scan time Minimum: 0 Maximum: 9223372036854775807 |
support_restore |
Boolean |
Indicates whether data can be rolled back to the backup created when the vulnerability was fixed. |
Example Requests
Query the first 10 records in the list of servers with EulerOS-SA-2021-1894 vulnerability.
GET https://{endpoint}/v5/2b31ed520xxxxxxebedb6e57xxxxxxxx/vulnerability/hosts?vul_id=EulerOS-SA-2021-1894&offset=0&limit=10
Example Responses
Status code: 200
Vul host info list
{ "total_num" : 1, "data_list" : [ { "host_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "severity_level" : "Low", "host_name" : "ecs", "host_ip" : "xxx.xxx.xxx.xxx", "agent_id" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "cve_num" : 1, "cve_id_list" : [ "CVE-2022-1664" ], "status" : "vul_status_ignored", "repair_cmd" : "zypper update update-alternatives", "app_path" : "/root/apache-tomcat-8.5.15/bin/bootstrap.jar", "support_restore" : true } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Vul host info list |
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.