Querying the Vulnerability List
Function
This API is used to query the list of detected vulnerabilities.
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/vulnerabilities
|
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. |
|
type |
No |
String |
Definition Vulnerability type. Constraints N/A Range Default Value linux_vul (Linux vulnerabilities are queried by default.) |
|
vul_id |
No |
String |
Definition Vulnerability ID. Constraints N/A Range The value can contain 0 to 256 characters. Default Value N/A |
|
vul_name |
No |
String |
Definition Vulnerability name. Constraints N/A Range The value can contain 0 to 256 characters. Default Value N/A |
|
limit |
No |
Integer |
Definition Number of records displayed on each page. Constraints N/A Range Value range: 10-200 Default Value 10 |
|
offset |
No |
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 The default value is 0. |
|
repair_priority |
No |
String |
Definition Vulnerability fixing priority. Constraints N/A Range Default Value N/A |
|
handle_status |
No |
String |
Definition Vulnerability handling status. Constraints N/A Range Default Value N/A |
|
cve_id |
No |
String |
Definition CVE ID. Constraints N/A Range The value can contain 0 to 32 characters. Default Value N/A |
|
label_list |
No |
String |
Definition Vulnerability tag. Constraints N/A Range The value can contain 0 to 128 characters. Default Value N/A |
|
status |
No |
String |
Definition Vulnerability status. Constraints N/A Range Default Value N/A |
|
asset_value |
No |
String |
Definition Asset importance of a server with vulnerabilities. Constraints N/A Range Default Value N/A |
|
group_name |
No |
String |
Definition The group that a server with vulnerabilities belongs to. Constraints N/A Range The value can contain 0 to 256 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 |
Long |
Definition Total number of vulnerabilities. Range The value range is 0 to 2,147,483,647. |
|
data_list |
Array of VulInfo objects |
Definition Vulnerability data list. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
vul_name |
String |
Definition Vulnerability name. Range The value can contain 0 to 256 characters. |
|
vul_id |
String |
Definition Vulnerability ID. Range The value can contain 0 to 64 characters. |
|
label_list |
Array of strings |
Definition Vulnerability tag list. Range N/A |
|
repair_necessity |
String |
Definition Necessity of fixing a vulnerability. Range |
|
severity_level |
String |
Definition Vulnerability risk level. Range
|
|
host_num |
Integer |
Definition Number of affected servers. Range The value range is 0 to 2,147,483,647. |
|
unhandle_host_num |
Integer |
Definition Number of unhandled servers, excluding ignored and fixed servers. Range The value range is 0 to 2,147,483,647. |
|
scan_time |
Long |
Definition Latest scan time, in ms. Range The value range is 0 to 9,223,372,036,854,775,807. |
|
solution_detail |
String |
Definition Vulnerability fixing guide. Range The value can contain 0 to 65,534 characters. |
|
url |
String |
Definition URL link. Range The value can contain 0 to 2,083 characters. |
|
description |
String |
Definition Vulnerability description. Range The value can contain 0 to 65,534 characters. |
|
type |
String |
Definition Vulnerability type. Range |
|
host_id_list |
Array of strings |
Definition ID list of servers where the vulnerability can be handled. Range N/A |
|
cve_list |
Array of cve_list objects |
Definition List of CVE information associated with the vulnerability. Range N/A |
|
patch_url |
String |
Definition Patch address. Range The value can contain 0 to 512 characters. |
|
repair_priority |
String |
Definition Fixing priority. Range |
|
hosts_num |
VulnerabilityHostNumberInfo object |
Number of affected servers |
|
repair_success_num |
Integer |
Definition Number of successful fixes. Range The value range is 0 to 1,000,000. |
|
fixed_num |
Long |
Definition Number of fixes. Range The value ranges from 0 to 1,000,000. |
|
ignored_num |
Long |
Definition Number of ignored items. Range The value ranges from 0 to 1,000,000. |
|
verify_num |
Integer |
Definition Number of verifications. Range The value range is 0 to 1,000,000. |
|
repair_priority_list |
Array of RepairPriorityListInfo objects |
Definition Fixing priorities. The number of servers corresponding to each priority is displayed. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
cve_id |
String |
Definition CVE ID Range The value can contain 0 to 32 characters. |
|
cvss |
Float |
Definition CVSS score. Range Value range: 0 to 10 |
|
Parameter |
Type |
Description |
|---|---|---|
|
important |
Integer |
Definition Number of important servers. Range The value range is 0 to 10,000. |
|
common |
Integer |
Definition Number of common servers. Range The value range is 0 to 10,000. |
|
test |
Integer |
Definition Number of test servers. Range The value range is 0 to 10,000. |
Example Requests
Query the first 10 records in the vulnerability list whose project_id is 2b31ed520xxxxxxebedb6e57xxxxxxxx.
GET https://{endpoint}/v5/2b31ed520xxxxxxebedb6e57xxxxxxxx/vulnerability/vulnerabilities?offset=0&limit=10
Example Responses
Status code: 200
Request succeeded.
{
"total_num" : 1,
"data_list" : [ {
"description" : "It was discovered that FreeType did not correctly handle certain malformed font files. If a user were tricked into using a specially crafted font file, a remote attacker could cause FreeType to crash, or possibly execute arbitrary code.",
"host_id_list" : [ "caa958ad-a481-4d46-b51e-6861b8864515" ],
"host_num" : 1,
"scan_time" : 1661752185836,
"severity_level" : "Critical",
"repair_necessity" : "Critical",
"solution_detail" : "To upgrade the affected software",
"type" : "linux_vul",
"unhandle_host_num" : 0,
"url" : "https://ubuntu.com/security/CVE-2022-27405",
"vul_id" : "USN-5528-1",
"vul_name" : "USN-5528-1: FreeType vulnerabilities",
"repair_priority_list" : [ {
"repair_priority" : "Critical",
"host_num" : 0
}, {
"repair_priority" : "High",
"host_num" : 0
}, {
"repair_priority" : "Medium",
"host_num" : 1
}, {
"repair_priority" : "Low",
"host_num" : 0
} ]
} ]
}
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