Updated on 2023-06-13 GMT+08:00

Querying Domain Consumption by 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 the consumption of domain names by carrier within a time range.

URI

GET /v1.0/cdn/statistics/carrier-detail-summary

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

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

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.

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/carrier-detail-summary?start_time=1511366400000&end_time=1511452799640&domain_name=ALL&stat_type=req_num&carrier=CMCC,CTCC&enterprise_project_id=0

Response

Response parameters

Table 2 describes the response parameter.

Table 2 Response parameter

Parameter

Type

Description

carrier_data

Array of objects

Specifies carrier data. For details, see Table 3.

carrier_data parameter description

Table 3 describes the parameters.

Table 3 carrier_data parameter description

Parameter

Type

Description

carrier

String

Specifies the carrier.

value

Integer

Specifies the value of the queried metric. The traffic unit is byte. The bandwidth unit is bit/s.

Example response
{
 "carrier_data":
   [
      {       
        "carrier":"CMCC",       
        "value": 857     
        },      
       { 
         "carrier": "CTCC", 
         "value": 545 
       } 
   ]
}

Status Code

See Status Codes.

Error Code

See Error Codes.