Queries the total number and proportions of HTTP status codes returned from one or more accelerated domain names.
Usage notes
- The maximum number of times that each user can call this operation per second is 100.
- 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 | DescribeDomainHttpCodeData |
The operation that you want to perform. Set the value to DescribeDomainHttpCodeData. |
DomainName | String | No | example.com |
You can specify multiple domain names and separate them with commas (,). You can specify at most 500 domain names in each call. By default, this operation queries the total number and proportions of HTTP status codes returned from all accelerated domain names that belong to your Alibaba Cloud account. |
StartTime | String | No | 2021-06-29T05:30:00Z |
The start 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 | 2021-06-29T05:45: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. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
EndTime | String | 2021-06-29T05:45:00Z |
The end of the time range that was queried. |
StartTime | String | 2021-06-29T05:30:00Z |
The beginning of the time range that was queried. |
RequestId | String | BC858082-736F-4A25-867B-E5B67C85ACF7 |
The ID of the request. |
DomainName | String | example.com |
The accelerated domain name. |
DataInterval | String | 300 |
The interval at which the monitoring data is queried. |
HttpCodeData | Array of UsageData |
The proportions of HTTP status codes at each time interval. |
|
UsageData | |||
TimeStamp | String | 2021-06-29T05:40:00Z |
The timestamp of the data returned. |
Value | Array of CodeProportionData |
The proportions of HTTP status codes. |
|
CodeProportionData | |||
Code | String | 200 |
The HTTP status code. |
Proportion | String | 66.046511627907 |
The proportion of the HTTP status code. |
Count | String | 300 |
The total number of HTTP status code returned. |
Examples
Sample requests
http(s)://cdn.aliyuncs.com/?Action=DescribeDomainHttpCodeData
&DomainName="example.com"
&StartTime=2021-06-29T05:30:00Z
&EndTime=2021-06-29T05:45:00Z
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeDomainHttpCodeDataResponse>
<RequestId>BC858082-736F-4A25-867B-E5B67C85ACF7</RequestId>
<EndTime>2021-06-29T05:45:00Z</EndTime>
<DomainName>example.com</DomainName>
<DataInterval>300</DataInterval>
<StartTime>2021-06-29T05:30:00Z</StartTime>
<HttpCodeData>
<UsageData>
<Value>
<CodeProportionData>
<Proportion>64.26332288401254</Proportion>
<Count>205</Count>
<Code>200</Code>
</CodeProportionData>
<CodeProportionData>
<Proportion>22.570532915360502</Proportion>
<Count>72</Count>
<Code>403</Code>
</CodeProportionData>
<CodeProportionData>
<Proportion>10.344827586206897</Proportion>
<Count>33</Count>
<Code>499</Code>
</CodeProportionData>
<CodeProportionData>
<Proportion>2.8213166144200628</Proportion>
<Count>9</Count>
<Code>504</Code>
</CodeProportionData>
</Value>
<TimeStamp>2021-06-29T05:30:00Z</TimeStamp>
</UsageData>
<UsageData>
<Value>
<CodeProportionData>
<Proportion>66.96969696969697</Proportion>
<Count>221</Count>
<Code>200</Code>
</CodeProportionData>
<CodeProportionData>
<Proportion>18.787878787878785</Proportion>
<Count>62</Count>
<Code>403</Code>
</CodeProportionData>
<CodeProportionData>
<Proportion>12.121212121212121</Proportion>
<Count>40</Count>
<Code>499</Code>
</CodeProportionData>
<CodeProportionData>
<Proportion>2.1212121212121215</Proportion>
<Count>7</Count>
<Code>504</Code>
</CodeProportionData>
</Value>
<TimeStamp>2021-06-29T05:35:00Z</TimeStamp>
</UsageData>
<UsageData>
<Value>
<CodeProportionData>
<Proportion>79.6976241900648</Proportion>
<Count>369</Count>
<Code>200</Code>
</CodeProportionData>
<CodeProportionData>
<Proportion>15.118790496760258</Proportion>
<Count>70</Count>
<Code>403</Code>
</CodeProportionData>
<CodeProportionData>
<Proportion>4.535637149028078</Proportion>
<Count>21</Count>
<Code>499</Code>
</CodeProportionData>
<CodeProportionData>
<Proportion>0.21598272138228944</Proportion>
<Count>1</Count>
<Code>502</Code>
</CodeProportionData>
<CodeProportionData>
<Proportion>0.4319654427645789</Proportion>
<Count>2</Count>
<Code>504</Code>
</CodeProportionData>
</Value>
<TimeStamp>2021-06-29T05:40:00Z</TimeStamp>
</UsageData>
</HttpCodeData>
</DescribeDomainHttpCodeDataResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "BC858082-736F-4A25-867B-E5B67C85ACF7",
"EndTime" : "2021-06-29T05:45:00Z",
"DomainName" : "example.com",
"DataInterval" : 300,
"StartTime" : "2021-06-29T05:30:00Z",
"HttpCodeData" : {
"UsageData" : [ {
"Value" : {
"CodeProportionData" : [ {
"Proportion" : 64.26332288401254,
"Count" : 205,
"Code" : "200"
}, {
"Proportion" : 22.570532915360502,
"Count" : 72,
"Code" : "403"
}, {
"Proportion" : 10.344827586206897,
"Count" : 33,
"Code" : "499"
}, {
"Proportion" : 2.8213166144200628,
"Count" : 9,
"Code" : "504"
} ]
},
"TimeStamp" : "2021-06-29T05:30:00Z"
}, {
"Value" : {
"CodeProportionData" : [ {
"Proportion" : 66.96969696969697,
"Count" : 221,
"Code" : "200"
}, {
"Proportion" : 18.787878787878785,
"Count" : 62,
"Code" : "403"
}, {
"Proportion" : 12.121212121212121,
"Count" : 40,
"Code" : "499"
}, {
"Proportion" : 2.1212121212121215,
"Count" : 7,
"Code" : "504"
} ]
},
"TimeStamp" : "2021-06-29T05:35:00Z"
}, {
"Value" : {
"CodeProportionData" : [ {
"Proportion" : 79.6976241900648,
"Count" : 369,
"Code" : "200"
}, {
"Proportion" : 15.118790496760258,
"Count" : 70,
"Code" : "403"
}, {
"Proportion" : 4.535637149028078,
"Count" : 21,
"Code" : "499"
}, {
"Proportion" : 0.21598272138228944,
"Count" : 1,
"Code" : "502"
}, {
"Proportion" : 0.4319654427645789,
"Count" : 2,
"Code" : "504"
} ]
},
"TimeStamp" : "2021-06-29T05:40:00Z"
} ]
}
}
Error codes
For a list of error codes, visit the API Error Center.