Changing the Status of a Vulnerability
Function
This API is used to change the status of a vulnerability.
URI
PUT /v5/{project_id}/vulnerability/status
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
enterprise_project_id | No | String | Enterprise project ID. The value 0 indicates the default enterprise project. To query all enterprise projects, set this parameter to all_granted_eps. |
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 user token. |
Content-Type | No | String | Default value: application/json; charset=utf-8 |
Parameter | Mandatory | Type | Description |
---|---|---|---|
operate_type | Yes | String | Operation type.
|
remark | No | String | Remarks |
select_type | No | String | Select vulnerabilities.
|
type | No | String | Vulnerability type. The default value is linux_vul. The options are as follows:
|
data_list | No | Array of VulOperateInfo objects | Vulnerability list |
host_data_list | No | Array of HostVulOperateInfo objects | Vulnerability list in the server dimension |
backup_info_id | No | String | Specifies the ID of the backup information processed by the vulnerability. If this parameter is not specified, the backup is not performed. |
custom_backup_hosts | No | Array of custom_backup_hosts objects | Customize the vault and backup name used by the backup host. For hosts that are not in the list, the system automatically selects the vault with the largest remaining space and generates a backup name. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
vul_id | Yes | String | Vulnerability ID |
host_id_list | Yes | Array of strings | Server list |
Parameter | Mandatory | Type | Description |
---|---|---|---|
host_id | Yes | String | Server ID |
vul_id_list | Yes | Array of strings | Vulnerability list |
Parameter | Mandatory | Type | Description |
---|---|---|---|
host_id | No | String | Host ID |
vault_id | No | String | Vault ID |
backup_name | No | String | Backup name |
Response Parameters
None
Example Requests
Change the vulnerability status of the server whose ID is 71a15ecc-049f-4cca-bd28-5e90aca1817f. Change the status of EulerOS-SA-2021-1894 to ignored.
{"operate_type" : "ignore","data_list" : [ {"vul_id" : "EulerOS-SA-2021-1894","host_id_list" : [ "71a15ecc-049f-4cca-bd28-5e90aca1817f" ]} ]}
Example Responses
None
Status Codes
Status Code | Description |
---|---|
200 | Request succeeded. |
Error Codes
See Error Codes.
- URI