You can call this operation to query the queries per second (QPS) statistics based on the Layer parameter for one or more CDN domains.

If you set neither StartTime nor EndTime, the data for the last 24 hours is returned. If you set both StartTime and EndTime, the data for the specified time range is returned.

  • You can specify multiple CDN domains and separate them with commas (,).
  • You can only query the last three months of data in each call.

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 DescribeDomainQpsDataByLayer

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

DomainName String No example.com

The name of the CDN domain that you want to query QPS data for. If you do not set this parameter, the data of all your CDN domains is returned.

You can specify multiple CDN domains and separate them with commas (,).

EndTime String No 2015-12-10T21: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 Coordinated Universal Time (UTC).
Interval String No 300

The data sampling interval. Unit: seconds. The valid values depend on the specified time range.

  • Less than 3 days: 300 (default), 3600, and 86400
  • 3 to 31 (exclusive) days: 3600 (default) and 86400
  • No less than 31 days: 86400 (default)

If you do not set this parameter or if you specify an invalid value, the default value is used.

IspNameEn String No beijing

The English name of the region. To query region names, call the DescribeCdnRegionAndIsp operation. If you do not set this parameter, the QPS data of the CDN domains in all regions is queried.

Layer String No all

The criterion that the query must be based on. You can specify the protocol for communications at different layers.Valid values:

  • Network layer: IPv4 and IPv6.
  • Application layer: http, https, and quic.
  • All layers: all.

Default value: all.

LocationNameEn String No unicom

The English name of the Internet service provider (ISP) for your CDN service. To query ISPs, call the DescribeCdnRegionAndIsp operation. If you do not set this parameter, the QPS data of CDN domains for all ISPs is queried.

StartTime String No 2015-12-10T20: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 minimum sampling interval is 5 minutes.
  • If you do not set this parameter, the data for the last 24 hours is queried.

Response parameters

Parameter Type Example Description
DataInterval String 300

The sampling interval. Unit: seconds.

DomainName String example.com

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

EndTime String 2015-12-10T21:00:00Z

The end of the time range where the QPS data was queried.

Layer String all

The condition where the query was based.

QpsDataInterval

The QPS data retrieved at each sampling interval.

DataModule

The parameters in DataModule.

AccDomesticValue String 12

The number of requests in Mainland China.

AccOverseasValue String 44

The number of requests outside Mainland China.

AccValue String 56

The number of requests in all regions.

DomesticValue String 0.12

The QPS calculated based on the visits in Mainland China.

OverseasValue String 0.44

The QPS calculated based on the visits outside Mainland China.

TimeStamp String 2015-12-10T21:00:00Z

The timestamp of the QPS data returned.

Value String 0.56

The QPS calculated based on the visits in all regions.

RequestId String BEA5625F-8FCF-48F4-851B-CA63946DA664

The ID of the request.

StartTime String 2015-12-10T20:00:00Z

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

Examples

Sample requests

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

Sample success responses

XML format

<DescribeDomainQpsDataByLayerResponse>
	  <QpsDataInterval>
		    <AccDomesticValue>12</AccDomesticValue>
		    <AccOverseasValue>44</AccOverseasValue>
		    <TimeStamp>2015-12-10T21:00:00Z</TimeStamp>
		    <Value>0.56</Value>
		    <AccValue>56</AccValue>
		    <DomesticValue>0.12</DomesticValue>
		    <OverseasValue>0.44</OverseasValue>
	  </QpsDataInterval>
	  <Layer>all</Layer>
	  <DomainName>example.com</DomainName>
	  <DataInterval>300</DataInterval>
	  <RequestId>BEA5625F-8FCF-48F4-851B-CA63946DA664</RequestId>
	  <StartTime>2015-12-10T20:00:00Z</StartTime>
	  <EndTime>2015-12-10T21:00:00Z</EndTime>
</DescribeDomainQpsDataByLayerResponse>

JSON format

{
	"Layer":"all",
	"QpsDataInterval":{
		"TimeStamp":"2015-12-10T21:00:00Z",
		"Value":"0.56",
		"OverseasValue":"0.44",
		"AccValue":"56",
		"AccOverseasValue":"44",
		"DomesticValue":"0.12",
		"AccDomesticValue":"12"
	},
	"DataInterval":"300",
	"RequestId":"BEA5625F-8FCF-48F4-851B-CA63946DA664",
	"DomainName":"example.com",
	"EndTime":"2015-12-10T21:00:00Z",
	"StartTime":"2015-12-10T20:00:00Z"
}

Error codes

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