Querying a Vulnerability Scan Policy
Function
This API is used to query a vulnerability scan policy.
Calling Method
For details, see Calling APIs.
URI
GET /v5/{project_id}/vulnerability/scan-policy
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant project ID |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
Enterprise user ID. 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 an IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
scan_period |
String |
Scan period
|
scan_vul_types |
Array of strings |
List of scanned vulnerability types |
scan_range_type |
String |
Range of hosts to be scanned. The options are as follows: -all_host -specific_host |
host_ids |
Array of strings |
Specifies the host ID list. When scan_range_type is set to specific_host, this parameter indicates the list of hosts to be scanned. |
total_host_num |
Long |
Total number of hosts that can be scanned for vulnerabilities |
status |
String |
Scan policy status. The options are as follows: -open: enabled -close: disabled |
Example Requests
Query the vulnerability scan policy whose project_id is 2b31ed520xxxxxxebedb6e57xxxxxxxx.
GET https://{endpoint}/v5/2b31ed520xxxxxxebedb6e57xxxxxxxx/vulnerability/scan-policy
Example Responses
Status code: 200
Vulnerability scan policy
{ "scan_period" : "one_day", "scan_vul_types" : [ "linux_vul" ], "scan_range_type" : "specific_host", "host_ids" : [ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ], "total_host_num" : 5, "status" : "open" }
Status Codes
Status Code |
Description |
---|---|
200 |
Vulnerability scan policy |
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