Exporting Information About Vulnerabilities and Their Affected Servers
Function
This API is used to export information about vulnerabilities and their affected servers.
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
POST /v5/{project_id}/vul/export
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
enterprise_project_id |
No |
String |
ID of the enterprise project that a server belongs. An enterprise project can be configured only after the enterprise project function is enabled. Enterprise project ID. The value 0 indicates the default enterprise project. To query servers in all enterprise projects, set this parameter to all_granted_eps. If you have only the permission on an enterprise project, you need to transfer the enterprise project ID to query the server in the enterprise project. Otherwise, an error is reported due to insufficient permission. |
|
type |
No |
String |
Vulnerability type. The options are as follows: -linux_vul: Linux vulnerability -windows_vul: Windows vulnerability -web_cms: Web-CMS vulnerability -app_vul: application vulnerability -urgent_vul: emergency vulnerability |
|
vul_id |
No |
String |
Vulnerability ID. |
|
vul_name |
No |
String |
Vulnerability name. |
|
host_id |
No |
String |
Server ID, which will be used when vulnerabilities of a single server are exported. |
|
export_size |
Yes |
Integer |
Number of exported data records. |
|
category |
Yes |
String |
Types of exported vulnerability data. Its value can be: |
|
limit |
No |
Integer |
limit |
|
offset |
No |
Integer |
Offset, which specifies the start position of the record to be returned. The value must be a number no less than 0. The default value is 0. |
|
repair_priority |
No |
String |
Fixing priority. Critical High Medium Low |
|
handle_status |
No |
String |
Handling status. It can be: |
|
cve_id |
No |
String |
Vulnerability ID. |
|
label_list |
No |
String |
Vulnerability tag. |
|
status |
No |
String |
Vulnerability status. The options are as follows: |
|
asset_value |
No |
String |
Asset importance. Its value can be: important common test |
|
group_name |
No |
String |
Server group name. |
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 the user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
export_headers |
Yes |
Array<Array<String>> |
Table heading list of exported vulnerability data |
|
vul_id_list |
No |
Array of strings |
Specifies the list of vulnerability IDs to be exported. |
|
host_id_list |
No |
Array of strings |
Specifies the list of server IDs to be exported. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
task_id |
String |
Task ID. |
Example Requests
Export Linux vulnerabilities. The fix urgency levels include Critical, High, Medium, and Low. The handling status is Unhandled. The exported column headers include the enterprise project, vulnerability name, and vulnerability ID.
POST https://{endpoint}/v5/{project_id}/vul/export?handle_status=unhandled&repair_priority=Critical,High,Medium,Low&offset=0&category=vul&type=linux_vul&export_size=200000&enterprise_project_id=xxx
{
"export_headers" : [ [ "enterprise_project_name", "Enterprise project" ], [ "vul_name", "Vulnerability name" ], [ "vul_id", "Vulnerability ID" ] ]
}
Example Responses
Status code: 200
Request succeeded.
{
"task_id" : "2b31ed520xxxxxxebedb6e57xxxxxxxx"
}
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