Help Center> Content Delivery Network> API Reference> Out-of-Date APIs> Statistics Analysis> Downloading a Table of Statistics by Region and Carrier
Updated on 2024-05-16 GMT+08:00

Downloading a Table of Statistics by Region and Carrier

Function

  • This API is used to download a table of statistics by region and carrier.
  • You can download metric data generated within the past 90 days.
  • The time span of data queried cannot exceed 31 days.
  • If the start time is 2022-10-24 00:00:00 and end time is 2022-10-25 00:00:00, the statistics in [2022-10-24 00:00:00, 2022-10-25 00:00:00) are queried.
  • The start time and end time must be timestamps in milliseconds. They must be both specified.
  • A single tenant can call this API 10 times per minute.

URI

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

Table 1 Query parameters

Parameter

Mandatory

Type

Description

start_time

Yes

Long

  • Start timestamp of the query. The timestamp must be set to a multiple of 5 minutes.
  • If the value of interval is 300, set start_time to a multiple of 5 minutes, for example, 1631240100000 (2021-09-10 10:15:00).
  • If interval is set to 3600, set start_time to the top of an hour, for example, 1631239200000 (2021-09-10 10:00:00).
  • If interval is set to 86400, set start_time to 00:00:00 GTM+08:00, for example, 1631203200000 (2021-09-10 00:00:00).

end_time

Yes

Long

  • End timestamp of the query. The timestamp must be set to a multiple of 5 minutes.
  • If the value of interval is 300, set end_time to a multiple of 5 minutes, for example, 1631243700000 (2021-09-10 11:15:00).
  • If interval is set to 3600, set end_time to the top of an hour, for example, 1631325600000 (2021-09-11 10:00:00).
  • If interval is set to 86400, set end_time to 00:00:00 GTM+08:00, for example, 1631376000000 (2021-09-12 00:00:00).

domain_name

Yes

String

Domain name list. Domain names are separated by commas (,), for example, www.test1.com,www.test2.com. The value all indicates that all domain names under your account are queried.

interval

No

Long

  • Query interval, in seconds.
  • 300 (5 minutes): The maximum query time span is two days.
  • 3600 (1 hour): The maximum query time span is 7 days.
  • 86400 (1 day): The maximum query time span is 31 days.
  • If this parameter is not passed, the system uses the smallest value corresponding to the queried time span by default.

country

No

String

  • Country and region codes, which are separated by commas (,). The value all indicates all codes. For details about the values, see the appendix.
  • This parameter cannot be set when carrier statistics are queried.
  • This parameter cannot be set when top URL statistics are queried.
  • When accessing regional data, set this parameter to cn (China).

excel_language

No

String

Language of the table to be created. The value can be zh (Chinese) or en (English). If this parameter is not passed, the default value zh is used.

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.

excel_type

Yes

String

Type of the statistics table. Currently, the following types are supported:

  • excel_type_usage: regional utilization statistics.
  • excel_type_access: regional access statistics.
  • excel_type_region: region distribution statistics.
  • excel_type_carrier: statistics by region and carrier.
  • excel_type_country: country and region statistics.
  • excel_type_top_url: top URL statistics.

region

No

String

  • Region. This parameter is valid only when country is set to cn (China).
  • This parameter cannot be set when carrier statistics are queried.
  • This parameter cannot be set when country and region statistics are queried.
  • This parameter cannot be set when top URL statistics are queried.

carrier

No

String

  • Carrier code.
  • This parameter cannot be set when region distribution statistics are queried.
  • This parameter cannot be set when country and region statistics are queried.
  • This parameter cannot be set when top URL statistics are queried.

Request Parameters

None

Response Parameters

None

Example Request

GET  https://cdn.myhuaweicloud.com/v1.0/cdn/statistics/region-carrier-excel?start_time=1667030400000&end_time_1667116800000&domain_name=www.test1.com&interval=300&country=cn&excel_language=zh&enterprise_project_id=all&excel_type=excel_type_region&region=beijing&carrier=dianxin

Example Response

None

Status Codes

Status Code

Description

200

Success response.

400

Error response.

Error Codes

See Error Codes.