You can call the DescribeDomainTopReferVisit operation to query frequently referenced URLs on a specified day and sort the URLs.

  • 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 DescribeDomainTopReferVisit.
DomainName String Yes The CDN domain name. You can specify one or more CDN domain names. By default, all CDN domain names are queried. Separate multiple CDN 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.
SortBy String No The method that is used to sort the returned URLs. Valid values: traf and pv. Default value: pv.

Response parameters

Parameter Type Description
RequestId String The ID of the request.
DomainName String The CDN domain name information.
StartTime String The beginning of the time range where the data was queried.
TopReferList ReferList [] The list of frequently referenced URLs.

ReferList

Parameter Type Description
ReferDetail String  The reference URL.
VisitData String The number of visits made to the reference URL.
VisitProportion Float The proportion of visits.
Flow String The volume of network traffic. Unit: bytes.
FlowProportion Float The proportion of the network traffic.

Examples

Sample request

http://cdn.aliyuncs.com?Action=DescribeDomainTopReferVisit&DomainName=example.com
&StartTime=2018-10-03T16:00:00Z
&<Common request parameters>

Sample success response

JSON format

{
    "TopReferList": {
        "ReferList":[
            {
                "VisitData": "229567",
                "ReferDetail": "-",
                "VisitProportion": 0.35,
                "Flow": "460486880",
                "FlowProportion": 0.35
            },
            {
                "VisitData": "2496",
                "ReferDetail": "123.57.158.8",
                "VisitProportion": 0.35,
                "Flow": "460486880",
                "FlowProportion": 0.35
            },
            {
                "VisitData": "448",
                "ReferDetail": "example1.com",
                "VisitProportion": 0.35,
                "Flow": "460486880",
                "FlowProportion": 0.35
            },
            {
                "VisitData": "3",
                "ReferDetail": "example2.net",
                "VisitProportion": 0.35,
                "Flow": "460486880",
                "FlowProportion": 0.35
            }
        ]
    },
    "RequestId": "95994621-8382-464B-8762-C708E73568D1",
    "DomainName": "example.com",
    "StartTime": "2018-10-03T16:00:00Z"
}       

Error codes

Error code Error message HTTP status code Description
Throttling Request was denied due to request throttling. 503 The error message returned because the request is denied due to network traffic throttling.
IllegalOperation Illegal domain, operation is not permitted. 403 The error message returned because the domain name is invalid.
OperationDenied Your account does not open CDN service yet. 403 The error message returned because the CDN service is not activated.
OperationDenied Your CDN service is suspended. 403 The error message returned because the CDN service is suspended.
InvalidDomain.NotFound The domain provided does not belong to you. 404 The error message returned because the domain name does not exist or does not belong to you.
InvalidDomain.Offline The domain provided is offline. 404 The error message returned because the domain name is disabled.
ServiceBusy The specified Domain is configuring, please retry later. 403 The error message returned because the domain name is being configured. Please try again later.
InvalidDomain.Configure_failed Failed to configure the provided domain. 500 The error message returned because the domain name configuration fails.
MissingParameter The specified value of parameter StartTime is not valid. 400 The error message returned because the StartTime parameter is not set.
InvalidStartTime.Malformed Specified start time is malformed. 400 The error message returned because the format of the StartTime parameter is invalid.
InvalidStartTime.ValueNotSupported Specified end time does not math the specified start time. 400 The error message returned because the time range specified by the StartTime and EndTime parameters exceeds 90 days.
InvalidDomainName.ValueNotSupported The specified value of parameter DomainName only support one or empty value. 400 The error message returned because you can only set one value to the DomainName parameter or leave it empty.