You can call this operation to query client IP addresses that are ranked by number of requests or network traffic consumed for the requests. The corresponding clients use these IP addresses to request resources from one or more Content Delivery Network (CDN) domains within a specified time range.

When you call this operation, follow these rules:
  • If you set neither StartTime nor EndTime, the data for the last 24 hours is returned. If you set EndTime, you must also set StartTime.
  • You can query data of up to the last 90 days in each call.
  • The time granularity is one hour.

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 DescribeDomainTopClientIpVisit

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

DomainName String No example.com

The name of the CDN domain that you want to query data for. You can specify multiple CDN domains and separate them with commas (,).

If you do not set this parameter, the data of all your CDN domains is returned.

EndTime String No 2019-10-01T16: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.
Limit String No 20

The maximum number of entries to return. Valid values: 1 to 100.

Default value: 20. The default value 20 specifies that top 20 data entries are returned.

LocationNameEn String No beijing

The English name of the region. You can specify multiple regions and separate them with commas (,). To query region names, call the DescribeCdnRegionAndIsp operation. If you do not set this parameter, the data for all regions is returned.

If you set this parameter, the data for the specified region is returned.

SortBy String No traf

The method that is used to sort the returned client IP addresses. Valid values:

  • traf: specifies that the returned data is sorted by network traffic.
  • acc: specifies that the returned data is sorted by number of visits.

Default value: traf.

StartTime String No 2019-09-30T16: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.
  • The time granularity is one hour.
  • If you do not specify this parameter, the data for the last 24 hours is queried.

Response parameters

Parameter Type Example Description
ClientIpList

The list of client IP addresses returned.

Acc Long 256

The total number of requests.

ClientIp String 1.1.xxx

The client IP address returned. Only IPv4 address is displayed.

Rank Integer 2

The ranking of the client IP address returned.

Traffic Long 1024

The total network traffic for the queried IP address that the corresponding client used to connect to CDN. Unit: bytes.

RequestId String 64D28B53-5902-409B-94F6-FD46680144FE

The ID of the request.

Samples

Sample requests

http://cdn.aliyuncs.com?Action=DescribeDomainTopClientIpVisit
&DomainName=example.com
&StartTime=2019-09-30T16:00:00Z
&EndTime=2019-10-01T16:00:00Z
&<Common request parameters>

Sample success responses

XML format

<DescribeDomainTopClientIpVisitResponse>
  <RequestId>64D28B53-5902-409B-94F6-FD46680144FE</RequestId>
  <ClientIpList>
        <Rank>1</Rank>
        <ClientIp>1.1.xxx</ClientIp>
        <Traffic>1024</Traffic>
        <Acc>128</Acc>
  </ClientIpList>
  <ClientIpList>
        <Rank>2</Rank>
        <ClientIp>2.2.xxx</ClientIp>
        <Traffic>2048</Traffic>
        <Acc>256</Acc>
  </ClientIpList>
</DescribeDomainTopClientIpVisitResponse>

JSON format

{
	"ClientIpList":[
		{
			"Rank":1,
			"Acc":128,
			"ClientIp":"1.1.xxx",
			"Traffic":1024
		},
		{
			"Rank":2,
			"Acc":256,
			"ClientIp":"2.2.xxx",
			"Traffic":2048
		}
	],
	"RequestId":"64D28B53-5902-409B-94F6-FD46680144FE"
}

Error codes

HTTP status code Error code Error message Description
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 InvalidEndTime.Malformed Specified EndTime is malformed. The error message returned because the specified end time is incorrectly formatted. 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 not supported.

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