Help Center> Content Delivery Network> API Reference> Out-of-Date APIs> Statistics Analysis> Querying Statistics About Each Domain Name Under a Region or Carrier
Updated on 2023-12-18 GMT+08:00

Querying Statistics About Each Domain Name Under a Region or Carrier

You can query data within the past 90 days.

The time span of data queried cannot exceed 31 days.

You can specify up to 100 domain names at a query.

The start time and end time must be specified at the same time. Their values must be precise down to the millisecond, but exact, 5 minute, 1 hour, or 4 hour intervals are allowed. If the time span is less than or equal to one day, the time granularity is 5 minutes, for example, 2020-07-01 08:05:00 and 2020-07-01 08:10:00. If the time span is longer than 1 day but shorter than or equal to 7 days, the time granularity is 1 hour. If the time span is longer than 7 days, the time granularity is 4 hours.

If the start time and end time do not meet the requirements, the returned data may be different from what was expected.

Function

This API is used to query statistics about each domain name under a specified carrier in a specified region and specified period.

URI

GET /v1.0/cdn/statistics/region-carrier-domain

Request

Request parameters

Table 1 describes the request parameters.

Table 1 Request parameters

Parameter

Mandatory

Type

Description

start_time

No

Long

Specifies the start time of a query (timestamp, in milliseconds).

end_time

No

Long

Specifies the end time of a query (timestamp, in milliseconds). You must specify both end_time and start_time, or neither of them.

domain_name

Yes

String

Specifies a domain name list. Use commas (,) to separate domain names, for example, www.test1.com,www.test2.com. The value ALL indicates that all domain names under a tenant are queried.

stat_type

Yes

String

Specifies the statistic types, including flux (traffic), bw (bandwidth), and req_num (total requests).

region

Yes

String

Specifies the region list, which covers the 34 provincial-level divisions (including Hong Kong, Macao, and Taiwan) of China, regions outside China, and others. Separate these regions with commas (,). For example, beijing,neimenggu.

NOTE:
  • Name of a region, for example, Beijing, Shanghai, Hong Kong, Macao, and Taiwan. Use Chinese Pinyin (beijing, shanghai, and gangaotai). Use haiwai for regions outside China.
  • The parameters for Shanxi and Shaanxi are as follows: shanxi and shaanxi.

The value ALL indicates that all regions are queried.

carrier

Yes

String

Specifies the carrier list. Abbreviated names of the carriers are used here. Currently, valid values are CTCC (China Telecom), CUCC (China Unicom), ENET (China Education and Research Network), CMCC (China Mobile), and CRC (Tietong). The carrier names are separated by commas (,). For example, CTCC,CMCC.

The value ALL indicates that all carriers are queried.

region and carrier cannot both be set to ALL.

enterprise_project_id

No

String

Enterprise project that the resource belongs to. This parameter is valid only when the enterprise project function is enabled. The value all indicates all projects. This parameter is mandatory when you use an IAM user to call this API.

Example request

Requested path

GET https://cdn.myhuaweicloud.com/v1.0/cdn/statistics/region-carrier-domain?start_time=1511366400000&end_time=1511452799640&domain_name=www.test1.com&stat_type=req_num&region=beijing,neimenggu&carrier=CMCC&enterprise_project_id=0

Response

Response parameters

Table 2 describes the response parameter.

Table 2 Response parameter

Parameter

Type

Description

domain

Object

Specifies the detailed data. For details, see Table 3.

domain parameter description

Table 3 describes the parameters.

Table 3 domain parameter description

Parameter

Type

Description

domain_name

String

Specifies the domain name.

value

Integer

Specifies the return value of a query. The traffic unit is byte. The bandwidth unit is bit/s.

Example response
{
   "domain":
      [
        {
          "domain_name": "www.test1.com",
          "value": 566
        },
        {
          "domain_name": "www.test2.com",
          "value": 545
        }
      ]
}

Status Code

See Status Codes.

Error Code

See Error Codes.