1. API Description
Domain name for API request: cwp.intl.tencentcloudapi.com.
This API is used to obtain the number of vulnerabilities of specified types in recent days and the number of hosts.
A maximum of 20 requests can be initiated per second for this API.
We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name |
Required |
Type |
Description |
| Action |
Yes |
String |
Common Params. The value used for this API: DescribeVulCountByDates. |
| Version |
Yes |
String |
Common Params. The value used for this API: 2018-02-28. |
| Region |
No |
String |
Common Params. This parameter is not required. |
| LastDays.N |
No |
Array of Integer |
Number of past days for data query. Subtract 1 from the actual number of days and fill in the value. |
| VulCategory |
No |
Integer |
Vulnerability category. 1: web CMS vulnerability; 2: application vulnerability; 4: Linux software vulnerability; 5: Windows system vulnerability. |
| IfEmergency |
No |
String |
Whether the vulnerabilities are emergency vulnerabilities. yes: yes. |
3. Output Parameters
| Parameter Name |
Type |
Description |
| VulCount |
Array of Integer |
Obtain the number of vulnerabilities for corresponding days in batch Note: This field may return null, indicating that no valid values can be obtained. |
| HostCount |
Array of Integer |
Obtain the number of hosts for corresponding days in batch |
| RequestId |
String |
The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
4. Example
Example1 Batch Obtaining the Recent Number of Vulnerabilities and Hosts of Specified Types
This example shows you how to batch obtain the recent number of vulnerabilities and hosts of specified types.
https:
&LastDays.0=1
&VulCategory=1
&<Common request parameters>
Output Example
{
"Response": {
"HostCount": [
0,
0,
3
],
"RequestId": "req-1002",
"VulCount": [
0,
0,
1
]
}
}
5. Developer Resources
SDK
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
Command Line Interface
6. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code |
Description |
| InternalError |
Internal error |
| InvalidParameter |
Incorrect parameter. |
| InvalidParameter.MissingParameter |
Missing parameter. |
| InvalidParameter.ParsingError |
Incorrect parameter parsing. |
| InvalidParameterValue |
Invalid parameter value. |
| MissingParameter |
Missing parameter error. |