Domain name for API request: cwp.tencentcloudapi.com.
This API is used to obtain the statistics data of hosts.
A maximum of 20 requests can be initiated per second for this API.
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: DescribeGeneralStat. |
Version | Yes | String | Common Params. The value used for this API: 2018-02-28. |
Region | No | String | Common Params. This parameter is not required. |
MachineType | No | String | CVM type |
MachineRegion | No | String | Machine region. Example: ap-guangzhou, ap-shanghai |
Parameter Name | Type | Description |
---|---|---|
MachinesAll | Integer | Total number of hosts |
MachinesUninstalled | Integer | Total number of hosts not installed with the CWPP client |
AgentsAll | Integer | Total number of CWPP clients |
AgentsOnline | Integer | Total number of online CWPP clients |
AgentsOffline | Integer | Total number of CWPP clients that are offline and shut down |
AgentsPro | Integer | Total number of Pro Edition CWPP clients |
AgentsBasic | Integer | Total number of Basic Edition CWPP clients |
AgentsProExpireWithInSevenDays | Integer | Total number of prepaid Pro Edition CWPP clients that will expire in 7 days |
RiskMachine | Integer | Total number of risky hosts |
Shutdown | Integer | Total number of hosts that are shut down |
Offline | Integer | Total number of offline hosts |
FlagshipMachineCnt | Integer | Number of Ultimate Edition hosts Note: This field may return null, indicating that no valid values can be obtained. |
ProtectDays | Integer | Protection duration, in days Note: This field may return null, indicating that no valid values can be obtained. |
AddedOnTheFifteen | Integer | Number of hosts added in the last 15 days Note: This field may return null, indicating that no valid values can be obtained. |
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. |
This example shows you how to obtain statistics on CWPP.
POST / HTTP/1.1
Host: cwp.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeGeneralStat
<Common request parameters>
{}
{
"Response": {
"MachinesAll": 87,
"MachinesUninstalled": 37,
"AgentsAll": 50,
"AgentsOnline": 7,
"AgentsOffline": 43,
"AgentsPro": 12,
"AgentsBasic": 38,
"AgentsProExpireWithInSevenDays": 1,
"RiskMachine": 0,
"Shutdown": 0,
"Offline": 0,
"ProtectDays": 1,
"FlagshipMachineCnt": 1,
"AddedOnTheFifteen": 1,
"RequestId": "cf25fc07-0e89-b71f-cb9a-c3fc030ccfd4"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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.InvalidFormat | Incorrect parameter format. |
InvalidParameter.ParsingError | Incorrect parameter parsing. |
InvalidParameterValue | Invalid parameter value. |
MissingParameter | Missing parameter error. |
Was this page helpful?