You can call this operation to query frequently referenced URLs within the specified time range and sort the URLs.

When you call this operation, note the following:
  • If you do not specify the StartTime parameter, the data of the previous day is queried.
  • You can query data for one domain or all domains under your account.
  • You can query data of up to the last 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 DescribeDomainTopReferVisit

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

DomainName String  No www.yourdomain.com

The name of the CDN domain to query. You can specify only one CDN domain name. If you do not specify the domain name, the data of all CDN domains is returned.

SortBy String  No pv

The method that is used to sort the returned URLs.

  • Valid values: traf and pv.
  • Default value: pv.
StartTime String  No 2017-12-21

The beginning of the time range to query.

Specify the time in the YYYY-MM-DD format. The time must be in UTC+8.

If you do not specify this parameter, the data for the last 24 hours is queried.

Response parameters

Parameter Type Example Description 
RequestId String 95994621-8382-464B-8762-C708E73568D1

The ID of the request.

DomainName String test.com

The name of the CDN domain for which the data was queried.

StartTime String 2015-11-28

The beginning of the time range where the data was queried.

TopReferList

The list of frequently referenced URLs.

ReferList

The list of frequently referenced URLs.

ReferDetail String live-hunantv.cdnpe.com

The referenced URL.

VisitData String 3

The number of visits.

Flow String 200

The network traffic, in bytes.

FlowProportion Float 0.5

The proportion of the network traffic.

VisitProportion Float 0.5

The proportion of visits.

Examples

Sample requests

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

Sample success responses

XML format

<DescribeDomainTopReferVisitResponse>
	  <TopReferList>
		    <ReferList>
			      <VisitData>229567</VisitData>
			      <ReferDetail>-</ReferDetail>
			      <VisitProportion>0.35</VisitProportion>
			      <Flow>460486880</Flow>
			      <FlowProportion>0.35</FlowProportion>
		    </ReferList>
		    <ReferList>
			      <VisitData>2496</VisitData>
			      <ReferDetail>123.57.158.8</ReferDetail>
			      <VisitProportion>0.35</VisitProportion>
			      <Flow>460486880</Flow>
			      <FlowProportion>0.35</FlowProportion>
		    </ReferList>
		    <ReferList>
			      <VisitData>448</VisitData>
			      <ReferDetail>example1.com</ReferDetail>
			      <VisitProportion>0.35</VisitProportion>
			      <Flow>460486880</Flow>
			      <FlowProportion>0.35</FlowProportion>
		    </ReferList>
		    <ReferList>
			      <VisitData>3</VisitData>
			      <ReferDetail>example2.net</ReferDetail>
			      <VisitProportion>0.35</VisitProportion>
			      <Flow>460486880</Flow>
			      <FlowProportion>0.35</FlowProportion>
		    </ReferList>
	  </TopReferList>
	  <RequestId>95994621-8382-464B-8762-C708E73568D1</RequestId>
	  <DomainName>example.com</DomainName>
	  <StartTime>2018-10-03</StartTime>
</DescribeDomainTopReferVisitResponse>

JSON format

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

Error codes

HTTP status code Error code Error message Description
400 MissingParameter The specified value of parameter StartTime is not valid. The error message returned because the specified start time is invalid.
400 InvalidStartTime.Malformed Specified StartTime is malformed. The error message returned because the specified start time is incorrectly formatted. For more information about the time format, see the Request parameters section.
400 InvalidDomainName.ValueNotSupported The specified value of parameter DomainName only support one or empty value. The error message returned because you cannot specify more than one CDN domain name for the DomainName parameter.
400 InvalidStartTime.ValueNotSupported The specified value of parameter StartTime is not supported. The error message returned because the specified start time is not supported.

For more information about error codes, visit API Error Center.