Help Center/ Content Delivery Network/ API Reference/ API/ Analytics/ Querying Analytics Configurations
Updated on 2025-09-05 GMT+08:00

Querying Analytics Configurations

Function

  • Configuration type. Value range:

  • 0: popular content statistics.

  • 1: Cloud Eye reporting.

Calling Method

For details, see Calling APIs.

URI

GET /v1/cdn/statistics/stats-configs

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

config_type

Yes

Integer

  • Configuration Type

  • Value range: 0 (popular content statistics) and 1 (Cloud Eye reporting).

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

total

Integer

Number of Analytics configurations.

data

Array of StatsConfigDetails objects

Configuration details.

Table 3 StatsConfigDetails

Parameter

Type

Description

config_type

Integer

Configuration type. 0: popular content statistics.

resource_type

String

Resource type. domain:resource_name: domain name. account:resource_name: account.

resource_name

String

Resource name, which is an account or a list of domain names. Separate domain names with commas (,).

config_info

ConfigInfo object

Configuration information.

expired_time

Long

Time when the Analytics configuration expires. The value is a timestamp in seconds.

Table 4 ConfigInfo

Parameter

Type

Description

url

TopUrl object

top_url configuration.

ua

TopUa object

top_ua configuration.

Table 5 TopUrl

Parameter

Type

Description

enable

Boolean

Configuration status.

limit

Integer

Number of metric items to report in the popular content statistics. For example, top_url 100 or top_url 1000.

sort_by_code

Boolean

Whether popular content statistics metrics can be reported by status code.

Table 6 TopUa

Parameter

Type

Description

enable

Boolean

Configuration status.

Status code: default

Table 7 Response body parameters

Parameter

Type

Description

error

ErrMsg object

Error code and error message.

Table 8 ErrMsg

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

Querying Analytics configurations

GET https://cdn.myhuaweicloud.com/v1/cdn/statistics/stats-configs?&config_type=0

Example Responses

None

Status Codes

Status Code

Description

200

Success response.

default

Error response.

Error Codes

See Error Codes.