呼叫DescribeDomainHttpCodeData查詢加速網域5分鐘粒度的HTTP返回碼總數和佔比資料。
Operation description
如果您不指定 StartTime 和 EndTime,該介面返回過去 24 小時的資料;指定 StartTime 和 EndTime,該介面返回指定時間段的資料。
支援查詢的時間粒度
根據單次查詢的最大時間跨度不同,請求參數 Interval 支援不同的查詢資料時間粒度,對應的可查詢歷史資料時間範圍和資料延遲如下:
| 時間粒度 | 單次查詢的最大時間跨度 | 可查詢歷史資料時間範圍 | 資料延遲 |
| 5 分鐘 | 3 天 | 93 天 | 15 分鐘 |
| 1 小時 | 31 天 | 186 天 | 一般延遲 3-4 小時 |
| 1 天 | 366 天 | 366 天 | 一般延遲 4 小時,不超過 24 小時 |
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cdn:DescribeDomainHttpCodeData |
none |
*Domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DomainName |
string |
No |
加速網域,多個網域用半形逗號(,)分隔,一次最多支援 500 個網域查詢。 預設查詢所有加速網域。 |
example.com |
| StartTime |
string |
No |
獲取資料起始時間點。 日期格式按照 ISO8601 表示法,並使用 UTC 時間,格式為 yyyy-MM-ddTHH:mm:ssZ。 |
2021-06-29T05:30:00Z |
| EndTime |
string |
No |
獲取資料結束時間點。 日期格式按照 ISO8601 表示法,並使用 UTC 時間,格式為 yyyy-MM-ddTHH:mm:ssZ。 Note
結束時間需大於起始時間。 |
2021-06-29T05:45:00Z |
| Interval |
string |
No |
指定查詢資料的時間粒度,單位:秒。 根據單次查詢的最大時間跨度不同,該參數支援 300(5 分鐘)、3600(1 小時)和 86400(1 天)取值,具體請參見使用說明中支援查詢的時間粒度。 |
300 |
| IspNameEn |
string |
No |
電信業者英文名,透過 DescribeCdnRegionAndIsp 介面獲得。如不填該參數,則代表預設查詢所有電信業者。 |
unicom |
| LocationNameEn |
string |
No |
區域英文名,透過 DescribeCdnRegionAndIsp 介面獲得。如不填該參數,則代表預設查詢所有區域。 |
beijing |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| EndTime |
string |
結束時間。時間格式為 ISO 8601,使用 UTC 時間。 |
2021-06-29T05:45:00Z |
| StartTime |
string |
開始時間。時間格式為 ISO 8601,使用 UTC 時間。 |
2021-06-29T05:30:00Z |
| RequestId |
string |
請求 ID。 |
BC858082-736F-4A25-867B-E5B67C85ACF7 |
| DomainName |
string |
加速網域。 |
example.com |
| DataInterval |
string |
時間間隔。 |
300 |
| HttpCodeData |
object |
||
| UsageData |
array<object> |
每個時間間隔的 HTTP 返回碼佔比資料清單。 |
|
|
array<object> |
|||
| TimeStamp |
string |
時間片起始時刻。時間格式為 ISO 8601,使用 UTC 時間。 |
2021-06-29T05:40:00Z |
| Value |
object |
||
| CodeProportionData |
array<object> |
各返回碼佔比使用資料清單。 |
|
|
object |
|||
| Code |
string |
HTTP 返回碼。 |
200 |
| Proportion |
string |
佔比使用資料。 |
66.046511627907 |
| Count |
string |
總數。 |
300 |
Examples
Success response
JSON format
{
"EndTime": "2021-06-29T05:45:00Z",
"StartTime": "2021-06-29T05:30:00Z",
"RequestId": "BC858082-736F-4A25-867B-E5B67C85ACF7",
"DomainName": "example.com",
"DataInterval": "300",
"HttpCodeData": {
"UsageData": [
{
"TimeStamp": "2021-06-29T05:40:00Z",
"Value": {
"CodeProportionData": [
{
"Code": "200",
"Proportion": "66.046511627907",
"Count": "300"
}
]
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingTimeParameter | The StartTime and EndTime must be both specified. | You must set both the start time and the end time. |
| 400 | InvalidStartTime.Malformed | The specified value of parameter StartTime is malformed. | |
| 400 | InvalidEndTime.Malformed | The specified value of parameter EndTime is malformed. | |
| 400 | InvalidEndTime.Mismatch | Specified EndTime does not match the specified StartTime. | StartTime must be earlier than EndTime. |
| 400 | InvalidStartTime.ValueNotSupported | The specified value of parameter StartTime is not supported. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.