Updated on 2025-11-27 GMT+08:00

Exporting CDN Data

Function

This API is used to export data from CDN.

Calling Method

For details, see Calling APIs.

URI

POST /v1.0/cdn/statistics/stats/export

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

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.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

action

No

String

Definition

Rule action.

Constraints

N/A

domain_name

No

String

List of domain names, which are separated by commas (.). If this parameter is set to all, reports are subscribed to for all domain names under the account.

start_time

No

Long

Query start time. The value is the number of milliseconds since the UNIX epoch (Jan 1, 1970).

end_time

No

Long

Query end time. The value is the number of milliseconds since the UNIX epoch (Jan 1, 1970).

group_by

No

String

Data grouping mode.

service_area

No

String

Definition

Service area of the domain name.

Constraints

If the service area is Chinese mainland or global, the domain name must be licensed by the MIIT.

Value Range

  • mainland_china: Chinese mainland.

  • outside_mainland_china: outside the Chinese mainland.

  • global: global.

Default Value

mainland_china

stat_type

No

String

Statistics types. Possible values: flux (traffic) and req_num (total requests).

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).

Response Parameters

Status code: 200

Success response.

Status code: default

Table 3 Response body parameters

Parameter

Type

Description

error

ErrMsg object

Error code and error message.

Table 4 ErrMsg

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

Success response.

default

Error response.

Error Codes

See Error Codes.