Last updated: 2020-12-02 10:25:27

1. API Description

Domain name for API request:

This API is used to query the statistical metrics of domain name access within a specified time period.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DescribeEcdnDomainStatistics.
Version Yes String Common parameter. The value used for this API: 2019-10-12.
Region No String Common parameter. This parameter is not required for this API.
StartTime Yes Timestamp Query start time, such as 2019-12-13 00:00:00.
The time span cannot exceed 90 days.
EndTime Yes Timestamp Query end time, such as 2019-12-13 23:59:59.
The time span cannot exceed 90 days.
Metrics.N Yes Array of String Statistical metric name. flux: traffic in bytes
bandwidth: bandwidth in bps
request: number of requests
delay: response time in ms
static_request: number of static requests
static_flux: static traffic in bytes
static_bandwidth: static bandwidth in bps
dynamic_request: number of dynamic requests
dynamic_flux: dynamic traffic in bytes
dynamic_bandwidth: dynamic bandwidth in bps
Domains.N No Array of String Specifies the list of domain names to be queried
Projects.N No Array of Integer Specifies the project ID to be queried, which can be viewed here
If no domain name is entered, the specified project will be queried; otherwise, the domain name will prevail
Offset No Integer Pagination offset. Default value: 0.
Limit No Integer Number of entries per page. Default value: 1000. Maximum value: 3,000.

3. Output Parameters

Parameter Name Type Description
Data Array of DomainData Domain name data
TotalCount Integer Quantity
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying domain name statistical metrics

Input Example
&StartTime=2018-09-04 00:00:00
&EndTime=2018-09-04 12:00:00
&<Common request parameters>

Output Example

  "Response": {
    "RequestId": "13d41d37-546f-42ed-a3b9-ff82a51ecd0a",
    "Data": [
        "Resource": "",
        "DetailData": [
            "Name": "request",
            "Value": 5628872958
            "Name": "flux",
            "Value": 3535122082980
            "Name": "delay",
            "Value": 87
            "Name": "bandwidth",
            "Value": 825782981
    "TotalCount": 20

5. Developer Resources


TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError.EcdnDbError Internal data error. Please submit a ticket for troubleshooting.
InternalError.EcdnSystemError System error. Please submit a ticket for troubleshooting.
InvalidParameter.EcdnParamError Parameter error. Please see the sample parameters in the documentation.
InvalidParameter.EcdnStatInvalidDate Invalid date. Please see the sample date in the documentation.
InvalidParameter.EcdnStatInvalidMetric Invalid statistical type. Please see the sample statistical analysis in the documentation.
ResourceNotFound.EcdnDomainNotExists This domain name does not exist under the account. Please check and try again.
ResourceNotFound.EcdnProjectNotExists The project does not exist.
ResourceNotFound.EcdnUserNotExists The ECDN service has not been activated. Please activate it first before using this API.
UnauthorizedOperation.EcdnAccountUnauthorized The sub-account is unauthorized to query full data.
UnauthorizedOperation.EcdnCamUnauthorized No CAM policy is configured for the sub-account.
UnauthorizedOperation.EcdnDomainUnauthorized The acceleration domain name is not authorized for the ECDN sub-account.
UnauthorizedOperation.EcdnHostUnauthorized The acceleration domain name is not authorized for the ECDN sub-account.
UnauthorizedOperation.EcdnNoDomainUnauthorized The sub-account does not have the permission to access the domain name. Please try again after authorization.
UnauthorizedOperation.EcdnProjectUnauthorized The project is not authorized for the sub-account.

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback