DescribeRealServerStatistics

Last updated: 2019-11-25 22:41:21

1. API Description

Domain name for API request: gaap.tencentcloudapi.com.

This API (DescribeRealServerStatistics) is used to query the statistics of an origin server’s health check results. Origin server status displayed as 1: normal, or 0: exceptional. The queried origin server must be bound to a listener or rule. The bound listener or rule ID must be specified when querying. This API supports displaying origin server status statistics for the past 1, 3, 6, 12, and 24 hours, with a granularity of 1 minute.

A maximum of 20 requests can be initiated per second for this API.

2. Input Parameters

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 parameter. The value used for this API: DescribeRealServerStatistics
Version Yes String Common parameter. The value used for this API: 2018-05-29
Region No String Common parameter. This parameter is not required for this API.
RealServerId Yes String Origin server ID
ListenerId Yes String Listener ID
WithinTime Yes Integer Statistics duration. Unit: hours. It only supports querying statistics for the past 1, 3, 6, 12, and 24 hours.
RuleId No String Rule ID

3. Output Parameters

Parameter Name Type Description
StatisticsData Array of StatisticsDataInfo Origin server status statistics
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying the Health Check Statistics of the Bound Origin Server

Query the health check statistics of the bound origin server.

Input Example

https://gaap.tencentcloudapi.com/?Action=DescribeRealServerStatistics
&RealServerId=rs-rfgt56hy
&ListenerId=listener-gucvb6d
&WithinTime=3
&<Common request parameters>

Output Example

{
  "Response": {
    "StatisticsData": [
      {
        "Time": 1564736040,
        "Data": 2000
      },
      {
        "Time": 1564735980,
        "Data": 2001
      }
    ],
    "RequestId": "5c680029-66b2-4be8-9630-7bd316ce70dd"
  }
}

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

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
FailedOperation Operation failed
InternalError Internal error
InvalidParameter Parameter error
InvalidParameterValue Parameter value error
MissingParameter Parameter missing
ResourceNotFound Resource does not exist