Content is empty
If you don't find the content you expect, please try another search term
Last updated:2021-07-20 11:45:44
The API request contains the specified directory /2020-06-30/statistics/GetDomainRequestPeriodRatioData, common request headers, and operation-specific request parameters. For more information, see the sample request.
Parameter | Required | Type | Description |
---|---|---|---|
CurrentPeriodStartTime | Yes | String | The beginning of the first time period. 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:14+0800. |
CurrentPeriodEndTime | Yes | String | The end of the first time period. 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:14+0800. |
PriorPeriodStartTime | Yes | String | The beginning of the second time period. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm+0800 format. The time must be in UTC+8. The value of this parameter must be different from that of the CurrentPeriodStartTime parameter. Example: 2016-08-01T21:14+0800. |
PriorPeriodEndTime | Yes | String | The end of the second time period. 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:14+0800. |
Metric | Yes | String | The metric to query. You can specify only one metric at a time. Valid values: flow (traffic in bytes), bandwidth (bandwidth in bit/s), request (number of requests), and qps (average number of requests per second). |
CdnType | Yes | String | The business type. You can specify only one type at a time. Valid values: file, video, page, and live. |
Interval | No | Long | The time granularity of the statistics data. Valid values: 1 (one minute), 5 (five minutes), 60 (one hour), and 1440 (one day). For granularities that are greater than or equal to 5 minutes, the peak bandwidth collected in the five-minute periods contained in the granularity is used. The default granularity is 5 minutes. When the granularity is 1 minute, the start time and the end time cannot be more than 24 hours apart. When the granularity is 5 minutes, the start time and the end time cannot be more than 31 days apart. For other granularities, the start time and the end time cannot be more than 31 days apart. |
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, area (expand by area), domain (expand by domain name), province (expand by province), isp (expand by ISP), ip (expand by IP address type), and schema (expand by protocol type). Default value: unexpand. |
Parameter | Type | Description |
---|---|---|
CurrentPeriodStartTime | String | The beginning of the first time period. |
CurrentPeriodEndTime | String | The end of the first time period. |
PriorPeriodStartTime | String | The beginning of the second time period. |
PriorPeriodEndTime | String | The end of the second time period. |
Metric | String | The metric that is queried. |
Interval | Long | The time granularity. |
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 ISP. |
IpType | String | The type of the IP address. |
SchemaType | String | The protocol type. |
ResultType | String | Indicates whether the statistics data is expanded and, if yes, in which dimensions. |
Datas | Datas[] | The statistics data. |
RequestId | String | The ID of the request. A unique request ID is returned for each request. The request ID is required for troubleshooting. |
Parameter | Type | Description |
---|---|---|
Condition | Condition[] | The query conditions. |
Data | Data[] | The statistics data. |
Parameter | Type | Description |
---|---|---|
Domains | String | The domain names, separated with commas (,). |
Areas | String | The areas, separated with commas (,). |
Provinces | String | The provinces. The value is not displayed if this condition was not specified. |
Isps | String | The ISPs. The value is not displayed if this condition was not specified. |
IpType | String | The type of the IP address. The value is not displayed if this condition was not specified. |
SchemaType | String | The protocol type. The value is not displayed if this condition was not specified. |
Parameter | Type | Description |
---|---|---|
CurrentPeriodTime | String | The time point in the first time period. |
PriorPeriodTime | String | The time point in the second time period. |
CurrentPeriodValue | Long | The value of the metric at the time point in the first time period. The metric can be flow (traffic in bytes), bandwidth (bandwidth in bit/s), request (number of requests), or qps (average number of requests per second). |
PriorPeriodValue | Long | The value of the metric at the time point in the second time period. The metric can be flow (traffic in bytes), bandwidth (bandwidth in bit/s), request (number of requests), or qps (average number of requests per second). |
PeriodRatio | Double | The comparison between the two metric values, which is rounded to two decimal places and calculated as follows: (CurrentPeriodValue - PriorPeriodValue)/PriorPeriodValue x 100%. |
Sample request
GET method:
GET /2020-06-30/statistics/GetDomainRequestPeriodRatioData?CurrentPeriodStartTime=2020-09-01T08%3a00%2b0800&CurrentPeriodEndTime=2020-09-01T08%3a05%2b0800&PriorPeriodStartTime=2020-09-02T08%3a00%2b0800&PriorPeriodEndTime=2020-09-02T08%3a05%2b0800&Metric=flow&Areas=CN&Provinces=beijing&CdnType=video&ResultType=
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetDomainRequestPeriodRatioData
x-version: 2020-06-30
POST method:
POST /2020-06-30/statistics/GetDomainRequestPeriodRatioData
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetDomainRequestPeriodRatioData
x-version: 2020-06-30
Content-Type: application/json
{
"CurrentPeriodStartTime":"2020-09-01T08:00+0800",
"CurrentPeriodEndTime":"2020-09-01T08:05+0800",
"PriorPeriodStartTime":"2020-09-02T08:00+0800",
"PriorPeriodEndTime":"2020-09-02T08:05+0800",
"Metric":"flow",
"Areas":"CN",
"Provinces":"beijing",
"CdnType":"video",
"ResultType":""
}
Sample response
{
"CurrentPeriodStartTime": "2020-09-01T08:00+0800",
"CurrentPeriodEndTime": "2020-09-01T08:05+0800",
"PriorPeriodStartTime": "2020-09-02T08:00+0800",
"PriorPeriodEndTime": "2020-09-02T08:05+0800",
"Metric": "flow",
"Interval": 5,
"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",
"RequestId": "e421e643-178f-4d5e-91a2-f9ee632daf08",
"Datas": [
{
"Condition": {},
"Data": [
{
"CurrentPeriodTime": "2020-09-01T08:00+0800",
"PriorPeriodTime": "2020-09-02T08:00+0800",
"CurrentPeriodValue": 0,
"PriorPeriodValue": 0,
"PeriodRatio": 0.0
}
]
}
]
}
Pure Mode