You can call the DescribeDomainAverageResponseTime operation to query the average response time of the specified CDN domain names.

  • If you do not set the StartTime and EndTime parameters, the data within the last 24 hours is queried.
  • If you set both the StartTime and EndTime parameters, the data within the specified time range is queried.
Note
  • You can query either one domain name or all domain names under your account.
  • The maximum time range that you can specify is the last 90 days.

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 DescribeDomainAverageResponseTime.
DomainName String No
  • The domain name. If you do not set this parameter, all domain names are queried.
  • You can specify one or more domain names.
  • Separate multiple domain names with commas (,).
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.
  • The minimum time granularity is five minutes. If you do not set this parameter, the data in 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.
TimeMerge String No Enables or disables automatic interval calculation. If the timeMerge parameter is set to 1, the value of interval is calculated according to the startTime and endTime. You can set either this parameter or the interval parameter.
Interval String No
  • The time granularity for query. Unit: seconds. Valid values:
  • Less than 3 days: 300 (default), 3600, and 86400
  • 3 to 31 days (excluding 31 days): 3600 (default) and 86400
  • No less than 31 days: 86400
  • If you do not set this parameter or the specified value is invalid, the default value is used.

Response parameters

Parameter Type Description
DomainName String The CDN domain name.
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.
DataInterval String The data sampling interval.
AvgRTPerInterval "DataModule": []

DataModule

Parameter Type Description
TimeStamp String The timestamp of the data.
Value String The average response time.

Examples

Sample request

http://cdn.aliyuncs.com?Action=DescribeDomainAverageResponseTime&DomainName=example.com
&StartTime=2015-12-10T20:00:00Z
&EndTime=2015-12-11T21:00:00Z
&<Common request parameters>

Sample response

JSON format

{
    "DomainName": "example.com",
    "RequestId": "3C6CCEC4-6B88-4D4A-93E4-D47B3D92CF8F",
    "StartTime": "2015-12-10T20:00:00Z",
    "EndTime": "2015-12-11T21:00:00Z",
    "DataInterval": "300",
    "AvgRTPerInterval": {
        "DataModule": [
            {
                "TimeStamp": "2015-12-10T20:00:00Z",
                "Value": "3"
            },
            {
                "TimeStamp": "2015-12-10T20:05:00Z",
                "Value": "3"
            }
        ]
    }
}

Error codes

Error code Error message HTTP status code Description
InvalidStartTime.Malformed Specified StartTime is malformed. 400 The error message returned because the format of the StartTime parameter is invalid.
InvalidEndTime.Malformed Specified EndTime is malformed. 400 The error message returned because the format of the 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 90 days.