Queries the top N domain names ranked by network traffic.

Before you call this operation, take note of the following rules:
  • If you do not set StartTime or EndTime, data collected within the current month is queried. If you set both StartTime and EndTime, data collected within the specified time range is queried.
  • The maximum time range for a data query is 90 days.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeTopDomainsByFlow

The operation that you want to perform. Set the value to DescribeTopDomainsByFlow.

StartTime String No 2019-10-21T08:00:00:00Z

The beginning of the time range to query.

  • Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format.
  • The time must be in UTC.
  • Data is collected every 5 minutes. If you do not set this parameter, data within the current month is queried.
EndTime String No 2019-10-22T08:00:00:00Z

The end of the time range to query.

  • 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.
Product String No CDN

The name of the service.

Limit Long No 20

The maximum number of domain names to query.

  • Valid values: 1 to 100.
  • Default value: 20.

Response parameters

Parameter Type Example Description
RequestId String 4E09C5D7-E1CF-4CAA-A45E-8727F4C8FD70

The ID of the request.

StartTime String 2016-03-01T04:00Z

The beginning of the time range that was queried.

EndTime String 2016-03-14T07:34Z

The end of the time range that was queried.

TopDomains Array

The top N domain names ranked by network traffic.

TopDomain
DomainName String example.com

The accelerated domain name that was returned.

Rank Long 1

The ranking of the accelerated domain name.

TotalTraffic String 2043859876683.9001

The total amount of network traffic.

TrafficPercent String 30.64191989360235

The proportion of the network traffic consumed by the accelerated domain name.

MaxBps Float 22139626

The peak bandwidth value.

MaxBpsTime String 1457111400

The time when the bandwidth reached the peak value.

TotalAccess Long 107784230

The number of visits to the accelerated domain name.

DomainCount Long 68

The total number of accelerated domain names that belong to your Alibaba Cloud account.

DomainOnlineCount Long 68

The total number of accelerated domains that are in the Enabled state within your Alibaba Cloud account.

Examples

Sample requests

http://cdn.aliyuncs.com?Action=DescribeTopDomainsByFlow
&StartTime=2019-10-21T08:00:00:00Z
&EndTime=2019-10-22T08:00:00:00Z
&Limit=5
&<Common request parameters>

Sample success responses

XML format

<DescribeTopDomainsByFlowResponse>
      <DomainCount>6</DomainCount>
      <DomainOnlineCount>6</DomainOnlineCount>
      <RequestId>AA553691-0A16-4CB4-B0A6-F209152B13AF</RequestId>
      <TopDomains>
            <TopDomain>
                  <MaxBps>153.29600000000002</MaxBps>
                  <Rank>1</Rank>
                  <TrafficPercent>99.99526940725673</TrafficPercent>
                  <TotalTraffic>21138</TotalTraffic>
                  <TotalAccess>22</TotalAccess>
                  <DomainName>example.com</DomainName>
                  <MaxBpsTime>2019-04-15T20:30:00Z</MaxBpsTime>
            </TopDomain>
      </TopDomains>
      <EndTime>2019-04-29T16:00:00Z</EndTime>
      <StartTime>2019-03-31T16:00:00Z</StartTime>
</DescribeTopDomainsByFlowResponse>

JSON format

{
    "DomainCount": 6,
    "DomainOnlineCount": 6,
    "RequestId": "AA553691-0A16-4CB4-B0A6-F209152B13AF",
    "TopDomains": {
        "TopDomain": [
            {
                "MaxBps": "153.29600000000002",
                "Rank": 1,
                "TrafficPercent": "99.99526940725673",
                "TotalTraffic": 21138,
                "TotalAccess": 22,
                "DomainName": "example.com",
                "MaxBpsTime": "2019-04-15T20:30:00Z"
            }
        ]
    },
    "EndTime": "2019-04-29T16:00:00Z",
    "StartTime": "2019-03-31T16:00:00Z"
}

Error codes

HttpCode Error code Error message Description
400 InvalidStartTime.Malformed Specified StartTime is malformed. The error message returned because the format of the specified start time is invalid. For more information about the time format, see the Request parameters section.
400 InvalidEndTime.Malformed Specified EndTime is malformed. The error message returned because the format of the specified end time is invalid. For more information about the time format, see the Request parameters section.
400 InvalidStartTime.ValueNotSupported The specified value of parameter StartTime is not supported. The error message returned because the specified start time is invalid. Rectify the start time and try again.

For a list of error codes, visit the API Error Center.