All Documents
Current Document

Content is empty

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

Documentation

GetUvData

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

GetUvData

Description

You can call this operation to obtain the number of unique IP addresses for specified domain names.

  • 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.
  • Time granularity: 5 minutes
  • Timeliness: You can query only data that was generated 30 minutes before.

Request syntax

The API request contains the specified directory /2020-06-30/statistics/GetUvData, 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.
ResultType No String Specifies whether to expand the statistics data. Valid values: unexpand and expand (expand by domain name). Default value: unexpand.

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, separated with commas (,).
ResultType Long Indicates whether the statistics data is expanded.
RequestId String The ID of the request. A unique request ID is returned for each request. The request ID is required for troubleshooting.
Datas UvDataByTime[] The number of unique IP addresses for each granular time period.

UvDataByTime

Parameter Type Description
Time String The time point.
Uv Long The total number of unique IP addresses for the specified domain names.
Domains UvDataByDomain[] The number of unique IP addresses for each domain name. This parameter is returned when the ResultType parameter is set to expand.

UvDataByDomain

Parameter Type Description
Domain String The domain name.
Uv Long The number of unique IP addresses for the domain name.

Examples

Sample request

GET method:

GET /2020-06-30/statistics/GetUvData?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: GetUvData
x-version: 2020-06-30

POST method:

POST /2020-06-30/statistics/GetUvData
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetUvData
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",
    "ResultType": "unexpand",
    "RequestId": "19676df1-e11d-46bf-bc6c-a1f1f2aee7ac",
    "Datas": [
        {
            "Time": "2020-09-01 08:00:00",
            "Uv": 35
        }
    ]
}
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback