Last updated:2021-07-20 11:46:10
The API request contains the specified directory /2020-06-30/statistics/GetDomainHttpCodeData, common request headers, and operation-specific request parameters. For more information, see the sample request.
Parameter | Required | Type | Description |
---|---|---|---|
StartTime | Yes | String | The beginning of the time range to query. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm+0800 format. The time must be in UTC+8. Example: 2016-08-01T21:10+0800. |
EndTime | Yes | String | The end of the time range to query. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm+0800 format. The time must be in UTC+8. The end time must be later than the start time. Example: 2016-08-01T21:15+0800. |
CdnType | Yes | String | The business type. You can specify only one type at a time. Valid values: file, video, and page. |
Domains | No | String | The domain names to query. Separate multiple domain names with commas (,). By default, all domain names of the current account that are online in the specified time period are queried. |
Areas | No | String | The areas of visitors. For more information, see Usage notes. Separate multiple areas with commas (,). By default, all areas are queried. |
Provinces | No | String | The provinces. For more information, see Usage notes. Separate multiple provinces with commas (,). By default, all provinces are queried. This parameter takes effect only when the value of the Areas parameter contains only CN. |
Isps | No | String | The name of the ISP. For more information, see Usage notes. You can specify only one ISP at a time. By default, all ISPs are queried. This parameter takes effect only when the value of the Areas parameter contains only CN. |
IpType | No | String | The type of the IP address. Valid values: ipv4 and ipv6. You can specify only one type at a time. By default, all types are queried. |
Schema | No | String | The protocol type. Valid values: http, http, and quic. You can specify only one type at a time. By default, all types are queried. |
ResultType | No | String | Specifies whether to expand the statistics data and, if yes, in which dimensions. Valid values: unexpand, domain (expand by domain name), code (expand by status code), and expand. Default value: unexpand. |
Parameter | Type | Description |
---|---|---|
StartTime | String | The beginning of the time range that is queried. |
EndTime | String | The end of the time range that is queried. |
CdnType | String | The business type. |
Domains | String | The domain names, separated with commas (,). |
Areas | String | The areas, separated with commas (,). |
Provinces | String | The provinces. |
Isps | String | The ISPs. |
IpType | String | The type of the IP address. |
Schema | String | The protocol type. |
ResultType | String | Indicates whether the statistics data is expanded and, if yes, in which dimensions. |
Datas | Datas[] | The HTTP status codes and their percentage. |
Parameter | Type | Description |
---|---|---|
Condition | Condition | The query conditions. |
HttpCodeData | HttpCodeData[] | The HTTP status codes. |
Parameter | Type | Description |
---|---|---|
Domains | String | The domain names, separated with commas (,). |
Parameter | Type | Description |
---|---|---|
CodeType | String | The type of the HTTP status code. Valid values: 2xx, 3xx, 4xx, and 5xx. |
Code | String | The HTTP status code, such as 200 or 404. |
Pv | Long | The number of requests responded with this status code or status codes of this type. |
Proportion | Double | The percentage of requests responded with this status code or status codes of this type. |
Sample request
GET method:
GET /2020-06-30/statistics/GetDomainHttpCodeData?StartTime=2020-09-01T08%3a00%2b0800&EndTime=2020-09-01T08%3a05%2b0800&CdnType=video&Domains=www.test.com&Areas=CN&Provinces=beijing&Isps=&IpType=&Schema=&ResultType=
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetDomainHttpCodeData
x-version: 2020-06-30
POST method:
POST /2020-06-30/statistics/GetDomainHttpCodeData
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetDomainHttpCodeData
x-version: 2020-06-30
Content-Type: application/json
{
"StartTime":"2020-09-01T08:00+0800",
"EndTime":"2020-09-01T08:05+0800",
"CdnType":"video",
"Domains":"www.test.com",
"Areas":"CN",
"Provinces":"beijing",
"Isps":"",
"IpType":"",
"Schema":"",
"ResultType":""
}
Sample response
{
"StartTime": "2020-09-01T08:00+0800",
"EndTime": "2020-09-01T08:05+0800",
"CdnType": "video",
"Domains": "www.test.com",
"Areas": "CN",
"Provinces": "beijing",
"Isps": "PBS,CT,CTT,CE,UN,CM,Other",
"IpType": "ipv4,ipv6",
"Schema": "http,https,quic",
"ResultType": "unexpand",
"Datas": [
{
"Condition":
{
"Domains":"www.test.com"
},
"httpcodeData":
[
{
"CodeType":"2xx",
"PV":3004,
"Proportion":55.54468
},
{
"CodeType":"4xx",
"PV":1893,
"Proportion":44.45537
}
]
}
],
"RequestId": "7f9c419a-3f57-433b-8399-a9fcb68c8d8e"
}
Did you find the above information helpful?
Please give us your feedback.
Thank you for your feedback.