All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

GetAreaIspData

Last updated:2021-07-20 11:45:43

GetAreaIspData

Description

You can call this operation to obtain the statistics data for different areas and ISPs. The statistics data includes the traffic, traffic percentage, the number of requests, and the percentage of the requests.

  • You can specify a start time and end time to query data. You must specify both the start time and the end time.
  • You can specify multiple domain names at a time. Separate multiple domain names with commas (,).
  • You can query data within the past year. The start time and the end time cannot be more than 31 days apart.

Request syntax

The API request contains the specified directory /2020-06-30/statistics/GetAreaIspData, common request headers, and operation-specific request parameters. For more information, see the sample request.

Request parameters

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:14+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:14+0800.
CdnType Yes String The business type. You can specify only one type at a time. Valid values: file, video, page, and all.
Domains No String The domain names to query. Separate multiple domain names with commas (,). By default, all domain names of the specified business type are queried.

Response parameters

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.
Datas AreaDataByArea[] 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.

AreaDataByArea

Parameter Type Description
Area String The area name. The area is a province in China or a country/region other than China. For more information, see Usage notes.
Flow Long The sum of service traffic for the specified domain names in the specified time period.
Pv Long The total number of requests for the specified domain names in the specified time period.
FlowProportion Double The percentage of traffic in the area for the specified domain names in all traffic in the specified time period.
PvProportion Double The percentage of requests in the area for the specified domain names in all requests in the specified time period.
Isps AreaDataByIsp[] The statistics data for different ISPs. This statistics data is collected only for the CN area.

AreaDataByIsp

Parameter Type Description
Isp String The name of the ISP. Valid values: UN, CM, CT, CTT, PBS, CE, Other, and OverseaIsp. For more information, see Usage notes.
Flow Long The sum of service traffic for the specified domain names in the specified time period.
Pv Long The total number of requests for the specified domain names in the specified time period.
FlowProportion Double The percentage of traffic of the ISP in the area for the specified domain names in all traffic in the specified time period.
PvProportion Double The percentage of requests of the ISP in the area for the specified domain names in all requests in the specified time period.

Examples

Sample request

GET method:

GET /2020-06-30/statistics/GetAreaIspData?StartTime=2020-09-01T08%3a00%2b0800&EndTime=2020-09-01T08%3a05%2b0800&CdnType=video
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetAreaIspData
x-version: 2020-06-30

POST method:

POST /2020-06-30/statistics/GetAreaIspData
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetAreaIspData
x-version: 2020-06-30
Content-Type: application/json
{
    "StartTime":"2020-09-01T08:00+0800",
    "EndTime":"2020-09-01T08:05+0800",
    "CdnType":"video"
}

Sample response

{
    "StartTime": "2020-09-01T08:00+0800",
    "EndTime": "2020-09-01T08:05+0800",
    "CdnType": "video",
    "Domains": "www.test.com",
    "Datas": [
        {
            "Area": "oversea",
            "Flow": 683,
            "Pv": 9,
            "FlowProportion": 0.23881202381826508,
            "PvProportion": 2.1739130434782608,
            "Isps": [
                {
                    "Isp": "OverseaIsp",
                    "Flow": 683,
                    "Pv": 9,
                    "FlowProportion": 100.0,
                    "PvProportion": 100.0
                }
            ]
        },
        {
            "Area": "zhejiang",
            "Flow": 19160,
            "Pv": 34,
            "FlowProportion": 6.699324123510922,
            "PvProportion": 8.212560386473431,
            "Isps": [
                {
                    "Isp": "CT",
                    "Flow": 11814,
                    "Pv": 21,
                    "FlowProportion": 61.659707724425886,
                    "PvProportion": 61.76470588235294
                },
                {
                    "Isp": "CM",
                    "Flow": 1709,
                    "Pv": 3,
                    "FlowProportion": 8.919624217118997,
                    "PvProportion": 8.823529411764707
                },
                {
                    "Isp": "UN",
                    "Flow": 5637,
                    "Pv": 10,
                    "FlowProportion": 29.420668058455114,
                    "PvProportion": 29.411764705882355
                }
            ]
        }   
    ],
    "RequestId": "6caaf996-f2c3-4b17-ae91-56164e088dad"
}
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback