All Documents
Current Document

Content is empty

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

Documentation

GetTopUrlData

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

GetTopUrlData

Description

You can call this operation to obtain the top URLs in specified domain names within a specified time period in a specified day. Up to 200 URLs can be returned. Only URLs that were accessed for more than 15 times are included. The statistics data includes the number of times a URL was accessed and the traffic. You can sort the data by traffic or the number of times the URLs were accessed.

  • 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 24 hours apart.
  • Timeliness: You can query only data that was generated 30 minutes before.
  • A single query can include up to 1,000 domain names. The time period of a single query must contain at least one time granularity. For example, if you select the time granularity of 5 minutes, the start time and the end time must be at least 5 minutes apart.

Request syntax

The API request contains the specified directory /2020-06-30/statistics/GetTopUrlData, 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, and page.
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.
LimitN No Long The maximum number of URLs to return. Valid values: 1 to 200. Default value: 100.
SortBy No String Specifies how the data is sorted. Valid values: flow (sort by traffic) and pv (sort by the number of requests). Default value: pv.

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.
LimitN Int The maximum number of URLs to return.
SortBy String Indicates how the data is sorted.
RequestId String The ID of the request. A unique request ID is returned for each request. The request ID is required for troubleshooting.
Datas ReferList[] The top URLs.

UrlList

Parameter Type Description
Url String The URL.
Rank Long The ranking of the URL.
Pv Long The number of times the URL was accessed.
PvProportion Double The percentage of requests for the URL in all requests in the specified time period.
Flow Long The traffic for the URL.
FlowProportion Double The percentage of traffic for the URL in all traffic in the specified time period.

Examples

Sample request

GET method:

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

POST method:

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

Sample response

{
    "StartTime": "2020-09-01T08:00+0800",
    "EndTime": "2020-09-01T08:05+0800",
    "CdnType": "video",
    "Domains": "www.test.com",
    "LimitN": 10,
    "SortBy": "flow",
    "Datas": [
        {
            "Url": "http://www.test.com/test.txt",
            "Rank": 1,
            "Pv": 352,
            "PvProportion": 100.0,
            "Flow": 257285,
            "FlowProportion": 100.0
        }
    ],
    "RequestId": "6b901375-8803-4653-8efb-b62566b7c675"
}
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback