Mengkueri kode status HTTP berdasarkan protokol.
Deskripsi operasi
-
Each account can call this operation up to 20 times per second.
-
If you do not set the StartTime or EndTime parameter, the request returns the data collected in the last 24 hours. If you set both these parameters, the request returns the data collected within the specified time range.
Time granularity
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 maximum time range per query, as described in the following table.
| Time granularity | Maximum time range per 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 |
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cdn:DescribeDomainHttpCodeDataByLayer |
none |
*Domain
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DomainName |
string |
No |
Nama domain yang diakselerasi. Anda dapat menentukan hingga 500 nama domain di setiap permintaan. Pisahkan beberapa nama domain dengan koma (,). Jika Anda tidak menentukan parameter ini, data semua nama domain yang diakselerasi di akun Anda akan dikueri. |
example.com |
| StartTime |
string |
No |
Waktu mulai rentang pengatur waktu yang akan dikueri. Tentukan pengatur waktu dalam format standar ISO 8601 yyyy-MM-ddTHH:mm:ssZ. Pengatur waktu harus dalam UTC. |
2020-07-05T22:00:00Z |
| EndTime |
string |
No |
Waktu akhir rentang pengatur waktu yang akan dikueri. Tentukan pengatur waktu dalam format standar ISO 8601 yyyy-MM-ddTHH:mm:ssZ. Pengatur waktu harus dalam UTC. Catatan
Waktu akhir harus lebih lambat dari waktu mulai. |
2020-07-06T22:00:00Z |
| Interval |
string |
No |
Granularitas waktu entri data. Unit: detik. Granularitas waktu bervariasi sesuai dengan rentang pengatur waktu maksimum per kueri. Nilai valid: 300 (5 menit), 3600 (1 jam), dan 86400 (1 hari). Untuk informasi lebih lanjut, lihat Catatan penggunaan. |
300 |
| IspNameEn |
string |
No |
Nama penyedia layanan Internet (ISP). Anda dapat memanggil operasi DescribeCdnRegionAndIsp untuk mengkueri nama ISP. Jika Anda tidak menentukan ISP, data semua ISP akan dikueri. |
telecom |
| LocationNameEn |
string |
No |
Nama wilayah. Anda dapat memanggil operasi DescribeCdnRegionAndIsp untuk mengkueri wilayah. Jika Anda tidak menentukan wilayah, data di semua wilayah akan dikueri. |
hangzhou |
| Layer |
string |
No |
Protokol yang digunakan untuk mengkueri kode status HTTP. Lapisan jaringan mendukung IPv4 dan IPv6. Lapisan aplikasi mendukung http, https, dan quic. Anda juga dapat menetapkan nilai ke all. Nilai default: all. |
all |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| DataInterval |
string |
The time interval between the data entries returned. Unit: seconds. |
300 |
| RequestId |
string |
The ID of the request. |
BEA5625F-8FCF-48F4-851B-CA63946DA664 |
| HttpCodeDataInterval |
object |
||
| DataModule |
array<object> |
The statistics of HTTP status codes returned at each time interval. |
|
|
object |
|||
| Value |
string |
The number of times that the HTTP status code was returned. |
{ "200": 10, "206": 100} |
| TimeStamp |
string |
The timestamp of the data returned. |
2015-12-10T20:35:00Z |
| TotalValue |
string |
The total number of times that HTTP status codes were returned. |
110 |
Contoh
Respons sukses
JSONformat
{
"DataInterval": "300",
"RequestId": "BEA5625F-8FCF-48F4-851B-CA63946DA664",
"HttpCodeDataInterval": {
"DataModule": [
{
"Value": "{ \"200\": 10, \"206\": 100}",
"TimeStamp": "2015-12-10T20:35:00Z",
"TotalValue": "110"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingTimeParameter | The StartTime and EndTime must be both specified. | |
| 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. | |
| 400 | InvalidStartTime.ValueNotSupported | The specified value of parameter StartTime is not supported. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.