You can perform the DescribeDomainRegionData operation to query visitor statistics by region. The data sampling interval is one day.

  • If you do not specify the StartTime or EndTime parameters, the data within the last 24 hours is queried.
  • If you specify both the StartTime and EndTime parameters, the data within the specified time range is queried.

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 DescribeDomainRegionData.
DomainName String No The name of the CDN domain to query the visitor data for. You can specify only one domain name. If you do not specify this parameter, the visitor data of all your CDN domains is queried.
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.
  • If you do not specify this parameter, the data for the last 24 hours is queried.
EndTime String No
  • The end of the time range where the data is queried. The end time must be later than the start time.
  • Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Response parameters

Parameter Type Description
DomainName String The name of the CDN domain.
DataInterval String The sampling interval of the visitor data. The interval is fixed at one day.
StartTime DateTime The beginning of the time range where the data was queried.
EndTime DateTime The end of the time range where the data was queried.
RegionDataInterval UsageData[] The visitor statistics for each interval.

Parameters in UsageData

Parameter Type Description
Value RegionProportionData[] The visit data from each region.

Parameters in RegionProportionData

Parameter Type Description
Region String The region information.
Proportion String The proportion of visits from each region. For example, a value of 90 indicates that 90% of the visits are from the specified region.
RegionEname String  The English name of the region.
AvgObjectSize String  The average response size, in bytes.
AvgResponseTime String  The average response time, in milliseconds.
Bps String  The bandwidth.
Qps String The queries per second.
AvgResponseRate String The average response speed, in bytes per second.
TotalBytes String  The total network traffic.
BytesProportion String  The proportion of bytes transferred from each region. For example, a value of 90 indicates that 90% of the bytes are transferred from the specified region.
TotalQuery String The total number of queries.

Examples

Sample request

http://cdn.aliyuncs.com?Action=DescribeDomainRegionData&DomainName=example.com
&StartTime=2015-12-05T12:00:00Z
&EndTime=2015-12-07T12:00:00Z
&<Common request parameters>

Sample success response

JSON format

{
  "Value": {
    "RegionProportionData": [
      {
        "Bps": "380.9614285714286",
        "Proportion": "0.01155980271270037",
        "TotalBytes": "2400057",
        "BytesProportion": "0.003544181046236794",
        "TotalQuery": "3",
        "RegionEname": "",
        "Region": "Japan",
        "AvgResponseRate": "154.3345765545624",
        "AvgObjectSize": "800019.0",
        "Qps": "5.9523809523809524E-5",
        "AvgResponseTime": "5183.666666666667"
      },
      {
        "Bps": "25110.431412698414",
        "Proportion": "0.31211467324291",
        "TotalBytes": "158195717",
        "BytesProportion": "0.23360872886644055",
        "TotalQuery": "81",
        "RegionEname": "xizang",
        "Region":"Tibet Autonomous Region",
        "AvgResponseRate": "1397.1430909315718",
        "AvgObjectSize": "1953033.5543209878",
        "Qps": "0.0016071428571428571",
        "AvgResponseTime": "1397.8765432098764"
      },
      {
        "Bps": "40343.86242857143",
        "Proportion": "0.33908754623921084",
        "TotalBytes": "254166333",
        "BytesProportion": "0.37532921137846464",
        "TotalQuery": "88",
        "RegionEname": "chongqing",
        "Region":"Chongqing",
        "AvgResponseRate": "787.8073097249128",
        "AvgObjectSize": "2888253.7875",
        "Qps": "0.001746031746031746",
        "AvgResponseTime": "3666.193181818182"
      }
    ]
  },
  "DataInterval": "86400",
  "RequestId": "2E5AD83F-BD7B-462E-8319-2E30E305519A",
  "DomainName": "example1.com",
  "EndTime": "2015-12-05T12:00:00Z",
  "StartTime": "2015-12-07T12:00:00Z"
}
			

Error codes

Error code Error message HTTP status code Description
InvalidStartTime.Malformed Specified StartTime is malformed. 400 The error message returned because the specified StartTime parameter is invalid.
InvalidEndTime.Malformed Specified EndTime is malformed. 400 The error message returned because the specified EndTime parameter is invalid.
InvalidStartTime.ValueNotSupported The specified value of parameter StartTime is not supported. 400 The error message returned because the time range specified by the EndTime and StartTime parameters exceeds the maximum value of 90 days.
InvalidDomain.NotFound The domain provided does not exist in our records. 404 The error message returned because the specified domain does not exist or does not belong to you.
InvalidEndTime.Mismatch Specified EndTime does not math the specified StartTime. 400 The error message returned because the specified EndTime parameter is earlier than the specified StartTime parameter.