DescribeIpVisit

Last updated: 2019-08-21 15:34:01

PDF

1. API Description

API request domain name: cdn.tencentcloudapi.com.

DescribeIpVisit describes the numbers of 5-minute and daily active users.

  • Number of 5-minute active users: Deduplicate client IP addresses in the log for every 5 minutes.
  • Number of daily active users: Deduplicated client IP addresses in the log for every day.

Default API request rate limit: 20 requests/sec.

2. Input Parameters

The following parameters are required for requesting this API, including action-specific parameters and common parameters. For more information about common parameters for all requests, see Common Request Parameters.

Parameter name Required Type Description
Action Yes String Common parameter, the name of this API: DescribeIpVisit
Version Yes String Common parameter, the version this API: 2018-06-06
Region No String Common parameter; optional for this API.
StartTime Yes Timestamp Query start time, such as 2018-09-04 10:40:10; the returned result is later than or equal to the specified time
According to the specified time granularity, forward rounding is applied; for example, if the query start time is 2018-09-04 10:40:10 and the query time granularity is 5 minutes, the time for the first returned entry is 2018-09-04 10:40:00
EndTime Yes Timestamp Query end time, such as 2018-09-04 10:40:10; the returned result is earlier than or equal to the specified time
According to the specified time granularity, forward rounding is applied; for example, if the query end time is 2018-09-04 10:40:10 and the query time granularity is 5 minutes, the time for the last returned entry is 2018-09-04 10:40:00
Domains.N No Array of String Specify the list of domain names to be queried; up to 30 domain names can be queried at a time
Project No Integer Specify the project ID to be queried, and you can view project IDs
Please note that if domain names are specified, this parameter will be ignored
Interval No String Data granularity:
5min: 5-minute. If the time interval to be queried is the last 24 hours (inclusive), the default value is 5min.
day: 1-day.If the time interval to be queried is more than 24 hours, the default value is day.

3. Output Parameters

Parameter name Type Description
Interval String Data granularity:
min: 1-minute
5min: 5-minute
day: 1-day
Data Array of ResourceData Origin-pull data details of each resource
RequestId String The ID of the request. Each request returns a unique ID. The RequestId is required to troubleshoot issues.

4. Sample

Sample 1. Querying the Details of Active IP Addresses

Input Sample Code

https://cdn.tencentcloudapi.com/?Action=DescribeIpVisit
&StartTime=2018-09-04 00:00:00
&EndTime=2018-09-04 12:00:00
&Domains.0=www.test.com
&<Common request parameter>

Output Sample Code

{
  "Response": {
    "RequestId": "123",
    "Data": [
      {
        "Resource": "multiDomains",
        "CdnData": [
          {
            "Metric": "ipVisit",
            "DetailData": [
              {
                "Time": "2018-09-03 00:00:00",
                "Value": 10
              },
              {
                "Time": "2018-09-03 00:05:00",
                "Value": 20
              }
            ],
            "SummarizedData": {
              "Name": "sum",
              "Value": 30
            }
          }
        ]
      }
    ],
    "Interval": 5
  }
}

5. Developer Resources

API Explorer

This tool provides various capabilities such as online call, signature verification, SDK code generation, and quick API retrieval that significantly reduce the difficulty of using TencentCloud API.

SDK

TencentCloud API 3.0 integrates software development toolkits (SDKs) that support various programming languages to make it easier for you to call the APIs.

TCCLI

6. Error Codes

The following only lists the error codes related to this API. For other error codes, see Common Error Codes.

Error Code Description
InternalError.CdnDbError Internal data error. Please submit a ticket for troubleshooting.
InternalError.CdnSystemError System error. Please submit a ticket for troubleshooting.
InvalidParameter.CdnHostInvalidParam Invalid domain name format. Please check and try again.
InvalidParameter.CdnInterfaceError Internal API error. Please submit a ticket for troubleshooting.
InvalidParameter.CdnParamError Parameter error. Please see the sample parameters in the documentation.
InvalidParameter.CdnStatInvalidDate Invalid date. Please see the sample date in the documentation.
InvalidParameter.CdnStatInvalidMetric Invalid statistical type. Please see the sample statistical analysis in the documentation.
InvalidParameter.CdnStatInvalidProjectId Incorrect project ID. Please check and try again.
ResourceNotFound.CdnHostNotExists This domain name does not exist under the account. Please check and try again.
ResourceNotFound.CdnUserNotExists The CDN service has not been activated. Please activate it first before using this API.
UnauthorizedOperation.CdnUserIsSuspended The CDN service has been suspended. Please restart it and try again.
UnauthorizedOperation.CdnUserNoWhitelist You are not on the whitelist, so the operation is prohibited.