nav-img
Advanced

Exporting Information About Vulnerabilities and Their Affected Servers

Function

This API is used to export information about vulnerabilities and their affected servers.

URI

POST /v5/{project_id}/vul/export

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Enterprise user ID. To query all enterprise projects, set this parameter to all_granted_eps.

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.

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. Its value can be:

Critical

High

Medium

Low

handle_status

No

String

Handling status. It can be:

  • unhandled

  • handled

cve_id

No

String

Vulnerability ID.

label_list

No

String

Vulnerability tag.

status

No

String

Vulnerability status.

asset_value

No

String

Asset importance. Its value can be:

important

common

test

group_name

No

String

Server group name.

export_size

Yes

Integer

Number of exported data records.

category

Yes

String

Types of exported vulnerability data. Its value can be:

  • vul: vulnerability

  • host: host vulnerability

Request Parameters

Table 3 Request header 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.

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

export_headers

No

Array<Array<String>>

Table heading list of exported vulnerability data

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

task_id

String

Task ID.

Example Requests

Export Linux vulnerabilities. The fixing levels include critical, high, medium, and low, and the handling status is unhandled. Export the vulnerability data whose table header is 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