Changing the Status of a Vulnerability
Function
This API is used to change the status of a vulnerability.
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
PUT /v5/{project_id}/vulnerability/status
|
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. |
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 |
|
Content-Type |
No |
String |
Definition Request parameter type. Constraints N/A Range The value can contain 0 to 128 characters. Default Value application/json; charset=utf-8 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
operate_type |
Yes |
String |
Definition Type of operation performed on a vulnerability Constraints N/A Range Default Value N/A |
|
remark |
No |
String |
Definition Operation description. Constraints N/A Range The value can contain 0 to 512 characters. Default Value N/A |
|
select_type |
No |
String |
Definition Type of all vulnerabilities to be handled. Constraints This parameter is required only when all vulnerabilities need to be handled. Range Default Value N/A |
|
type |
No |
String |
Definition Vulnerability type. Constraints N/A Range Default Value linux_vul |
|
data_list |
No |
Array of VulOperateInfo objects |
Definition Specify the vulnerabilities and images to be handled in the vulnerability dimension. Constraints N/A Range Minimum value: 1; maximum value: 500 Default Value N/A |
|
host_data_list |
No |
Array of HostVulOperateInfo objects |
Definition Specify the vulnerabilities and images to be handled in the server dimension. Constraints N/A Range Minimum value: 1; maximum value: 500 Default Value N/A |
|
backup_info_id |
No |
String |
Definition It specifies the ID of the backup information corresponding to the vulnerability handling operation. If this parameter is not specified, the backup is not performed. Constraints N/A Range The value can contain 1 to 128 characters. Default Value N/A |
|
custom_backup_hosts |
No |
Array of custom_backup_hosts objects |
Definition List of repositories and backup names of the servers specified for backup. For servers that are not in the list, the system automatically selects the vault with the largest remaining space and generates a backup name. Constraints This parameter takes effect only if backup_info_id is specified. Range The value range is 1 to 50. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
vul_id |
Yes |
String |
Definition Vulnerability ID. Constraints N/A Range Length: 1 to 64 characters Default Value N/A |
|
host_id_list |
Yes |
Array of strings |
Definition Hosts Constraints N/A Range The value ranges from 1 to 500. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
host_id |
Yes |
String |
Definition Server ID. Constraints N/A Range Length: 1 to 64 characters Default Value N/A |
|
vul_id_list |
Yes |
Array of strings |
Definition Vulnerability list Constraints N/A Range The value ranges from 1 to 500. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
host_id |
No |
String |
Definition Host ID. Constraints N/A Range The value can contain 1 to 128 characters. Default Value N/A |
|
vault_id |
No |
String |
Definition Repository ID. Constraints N/A Range The value can contain 1 to 128 characters. Default Value N/A |
|
backup_name |
No |
String |
Definition Backup name. Constraints N/A Range The value can contain 1 to 64 characters. Default Value N/A |
Response Parameters
Status code: 200
Request succeeded.
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.
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