Queries HTTP status codes by protocol.
Description
- You can call this operation up to 20 times per second.
- If you do not set StartTime or EndTime, data collected within the last 24 hours is queried. If you set both StartTime and EndTime, data collected within the specified time range is queried.
The time granularity supported by the Interval parameter, the maximum time period within which historical data is available, and the data delay vary with the time range to query, as described in the following table.
Time granularity |
Time range to query |
Historical data available |
Data delay |
---|---|---|---|
5 minutes |
3 days |
93 days |
15 minutes |
1 hour |
31 days |
186 days |
4 hours |
1 day |
366 days |
366 days |
04:00 on the next day |
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeDomainHttpCodeDataByLayer |
The operation that you want to perform. Set the value to DescribeDomainHttpCodeDataByLayer. |
DomainName | String | No | example.com |
The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify at most 500 domain names in each call. If you do not specify a domain name, data of all domain names is queried. |
StartTime | String | No | 2020-07-05T22: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. |
EndTime | String | No | 2020-07-06T22:00:00Z |
The end 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. Note The end time must be later than the start time.
|
Interval | String | No | 300 |
The time interval between the data entries. Unit: seconds. The time granularity varies with the time range to query. Supported values: 300 (5 minutes), 3600 (1 hour), and 86400 (1 day). For more information, see Usage notes. |
IspNameEn | String | No | telecom |
The name of the Internet service provider (ISP) for your Alibaba Cloud CDN service. You can call the DescribeCdnRegionAndIsp operation to query ISP names. If you do not specify an ISP, data of all ISPs is queried. |
LocationNameEn | String | No | hangzhou |
The name of the region. You can call the DescribeCdnRegionAndIsp operation to query the most recent region list. If you do not specify a region, data in all regions is queried. |
Layer | String | No | all |
The protocol by which you want to query HTTP status codes. The network layer supports IPv4 and IPv6. The application layer supports http, https, and quic. You can also set the value to all. The default value is all. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
DataInterval | String | 300 |
The time interval between the data entries returned. Unit: seconds. |
RequestId | String | BEA5625F-8FCF-48F4-851B-CA63946DA664 |
The ID of the request. |
HttpCodeDataInterval | Array of DataModule |
The number of HTTP status codes returned at each time interval. |
|
DataModule | |||
Value | String | "Value": { "200": 10, "206": 100} |
The number of times that the HTTP status code was returned. |
TimeStamp | String | 2015-12-10T20:35:00Z |
The timestamp of the data returned. |
TotalValue | String | 110 |
The total number of times that HTTP status codes were returned at each time interval. |
Examples
Sample requests
http(s)://cdn.aliyuncs.com/?Action=DescribeDomainHttpCodeDataByLayer
&DomainName=example.com
&StartTime=2015-12-10T20:00:00Z
&EndTime=2015-12-10T21:00:00Z
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeDomainHttpCodeDataByLayerResponse>
<HttpCodeDataInterval>
<DataModule>
<TimeStamp>2015-12-10T21:00:00Z</TimeStamp>
<Value>
<200>10</200>
<206>100</206>
</Value>
<TotalValue>110</TotalValue>
</DataModule>
<DataModule>
<TimeStamp>2015-12-10T20:35:00Z</TimeStamp>
<Value>
<200>12</200>
<206>120</206>
</Value>
<TotalValue>132</TotalValue>
</DataModule>
</HttpCodeDataInterval>
<DataInterval>300</DataInterval>
<RequestId>BEA5625F-8FCF-48F4-851B-CA63946DA664</RequestId>
</DescribeDomainHttpCodeDataByLayerResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"HttpCodeDataInterval" : {
"DataModule" : [ {
"TimeStamp" : "2015-12-10T21:00:00Z",
"Value" : {
"200" : 10,
"206" : 100
},
"TotalValue" : 110
}, {
"TimeStamp" : "2015-12-10T20:35:00Z",
"Value" : {
"200" : 12,
"206" : 120
},
"TotalValue" : 132
} ]
},
"DataInterval" : "300",
"RequestId" : "BEA5625F-8FCF-48F4-851B-CA63946DA664"
}
Error codes
For a list of error codes, visit the API Error Center.