You can call the DescribeDomainRealTimeByteHitRateData operation to query the byte hit rate with a time granularity of one minute.

Note
  • You can query the data within the last seven days. For each query, the time range specified by the StartTime and EndTime parameters cannot exceed 24 hours.
  • The network traffic destined for different domain names may be redirected to the same origin. Therefore, the obtained request hit rates may be inaccurate. The accuracy of query results depends on the actual configurations.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Description
Action String  Yes The operation that you want to perform. Set this parameter to DescribeDomainRealTimeByteHitRateData.
DomainName String Yes The domain name.
StartTime String No The beginning of the time range where the data is queried.
  • Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
  • Example: 2016-10-20T04:00:00Z.
  • If you do not set this parameter, the data within the hour before the EndTime is queried.
EndTime String No The end of the time range where the data is queried.
  • Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
  • Example: 2016-10-20T04:00:00Z.
  • If you do not set this parameter, the data within the hour after the StartTime is queried.

Response parameters

Parameter Type Description
RequestId String The ID of the request.
TimeStamp String The timestamp of the data.
  • The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mmZ format. The time is displayed in UTC.
  • Example: 2016-10-20T04:00:00Z.
ByteHitRate Float The byte hit rate.

Examples

Sample request

https://cdn.aliyuncs.com/?Action=DescribeDomainRealTimeByteHitRateData&DomainName=example.com&EndTime=2018-01-02T11%3A05%3A37Z<Common request parameters>

Sample success response

JSON format

{
   "Data":{
      "ByteHitRateModel":[
         {
            "TimeStamp":"2018-01-02T11:26:00Z",
            "ByteHitRate":0.8956940476262277
         },
         {
            "TimeStamp":"2018-01-02T11:25:00Z",
            "ByteHitRate":0.8429129920796812
         }
      ]
   },
   "RequestId":"70A26B11-3673-479C-AEA8-E03FC5D3496D"
}
			

Error codes

Error codes Error message HTTP status code Description
InvalidTime.Malformed Specified StartTime or EndTime is malformed. 400 The error message returned because the format of the time parameters is invalid.
InvalidDomainName.Malformed Specified DomainName is malformed. 400 The error message returned because the domain name is not specified or the specified domain name does not exist.