tencent cloud

Feedback

DescribeDnsData

Last updated: 2023-05-25 17:35:59
This document is currently invalid. Please refer to the documentation page of the product.

1. API Description

Domain name for API request: teo.tencentcloudapi.com.

This API is used to get DNS requests.

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 Params. The value used for this API: DescribeDnsData.
Version Yes String Common Params. The value used for this API: 2022-09-01.
Region No String Common Params. This parameter is not required.
StartTime Yes Timestamp ISO8601 The start time.
EndTime Yes Timestamp ISO8601 The end time.
Filters.N No Array of Filter Filter criteria. Each filter criteria can have up to 20 entries.
  • zone:
    Filter by site name, such as tencent.com (up to one entry)
    Type: String
    Required: No
  • host:
    Filter by domain name, such as test.tencent.com (up to one entry)
    Type: String
    Required: No
  • type:
    Filter by DNS record type
    Type: String
    Required: No
    Values:
    A: A record
    AAAA: AAAA record
    CNAME: CNAME record
    MX: MX record
    TXT: TXT record
    NS: NS record
    SRV: SRV record
    CAA: CAA record
  • code:
    Filter by DNS status code
    Type: String
    Required: No
    Values:
    NoError: Success
    NXDomain: Not found the request domain
    NotImp: Not supported request type
    Refused: The domain name server refuses to execute the request for policy reasons
  • area:
    Filter by DNS region
    Type: String
    Required: No
    Values:
    Asia
    Europe
    Africa
    Oceania
    Americas
  • Interval No String The query time granularity. Values:
  • min: 1 minute;
  • 5min: 5 minute;
  • hour: 1 hour;
  • day: 1 day.
  • This field will be set to the default value min if not specified.

    3. Output Parameters

    Parameter Name Type Description
    Data Array of DnsData DNS statistics.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Getting the DNS requests of a site

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeDnsData
    <Common request parameters>
    
    {
        "StartTime": "2020-09-01T00:00:00+00:00",
        "EndTime": "2020-09-22T00:01:00+00:00",
        "Filters": [
            {
                "Name": "zone",
                "Values": [
                    "tencent.com"
                ]
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "9cc50b24-7dc5-44f4-96ce-95825d53ff2f",
            "Data": [
                {
                    "Time": "2020-09-01T00:00:00+00:00",
                    "Value": 101
                },
                {
                    "Time": "2020-09-01T00:01:00+00:00",
                    "Value": 102
                },
                {
                    "Time": "2020-09-01T00:02:00+00:00",
                    "Value": 103
                },
                {
                    "Time": "2020-09-01T00:03:00+00:00",
                    "Value": 104
                },
                {
                    "Time": "2020-09-01T00:04:00+00:00",
                    "Value": 105
                },
                {
                    "Time": "2020-09-01T00:05:00+00:00",
                    "Value": 0
                },
                {
                    "Time": "2020-09-01T00:06:00+00:00",
                    "Value": 0
                },
                {
                    "Time": "2020-09-01T00:07:00+00:00",
                    "Value": 107
                },
                {
                    "Time": "2020-09-01T00:08:00+00:00",
                    "Value": 108
                },
                {
                    "Time": "2020-09-01T00:09:00+00:00",
                    "Value": 109
                }
            ]
        }
    }
    

    Example2 Getting the DNS requests of a domain name

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeDnsData
    <Common request parameters>
    
    {
        "StartTime": "2020-09-01T00:00:00+00:00",
        "EndTime": "2020-09-01T00:09:59+00:00",
        "Filters": [
            {
                "Name": "zone",
                "Values": [
                    "tencent.com"
                ]
            },
            {
                "Name": "host",
                "Values": [
                    "test.tencent.com"
                ]
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "9cc50b24-7dc5-44f4-96ce-95825d53ff2f",
            "Data": [
                {
                    "Time": "2020-09-01T00:00:00+00:00",
                    "Value": 101
                },
                {
                    "Time": "2020-09-01T00:01:00+00:00",
                    "Value": 102
                },
                {
                    "Time": "2020-09-01T00:02:00+00:00",
                    "Value": 103
                },
                {
                    "Time": "2020-09-01T00:03:00+00:00",
                    "Value": 104
                },
                {
                    "Time": "2020-09-01T00:04:00+00:00",
                    "Value": 105
                },
                {
                    "Time": "2020-09-01T00:05:00+00:00",
                    "Value": 0
                },
                {
                    "Time": "2020-09-01T00:06:00+00:00",
                    "Value": 0
                },
                {
                    "Time": "2020-09-01T00:07:00+00:00",
                    "Value": 107
                },
                {
                    "Time": "2020-09-01T00:08:00+00:00",
                    "Value": 108
                },
                {
                    "Time": "2020-09-01T00:09:00+00:00",
                    "Value": 109
                }
            ]
        }
    }
    

    Example3 Getting the DNS requests made in Africa and Asia by a site

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeDnsData
    <Common request parameters>
    
    {
        "StartTime": "2020-09-01T00:00:00+00:00",
        "EndTime": "2020-09-01T00:09:59+00:00",
        "Filters": [
            {
                "Name": "zone",
                "Values": [
                    "tencent.com"
                ]
            },
            {
                "Name": "area",
                "Values": [
                    "Asia",
                    "Africa"
                ]
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "9cc50b24-7dc5-44f4-96ce-95825d53ff2f",
            "Data": [
                {
                    "Time": "2020-09-01T00:00:00+00:00",
                    "Value": 101
                },
                {
                    "Time": "2020-09-01T00:01:00+00:00",
                    "Value": 102
                },
                {
                    "Time": "2020-09-01T00:02:00+00:00",
                    "Value": 103
                },
                {
                    "Time": "2020-09-01T00:03:00+00:00",
                    "Value": 104
                },
                {
                    "Time": "2020-09-01T00:04:00+00:00",
                    "Value": 105
                },
                {
                    "Time": "2020-09-01T00:05:00+00:00",
                    "Value": 0
                },
                {
                    "Time": "2020-09-01T00:06:00+00:00",
                    "Value": 0
                },
                {
                    "Time": "2020-09-01T00:07:00+00:00",
                    "Value": 107
                },
                {
                    "Time": "2020-09-01T00:08:00+00:00",
                    "Value": 108
                },
                {
                    "Time": "2020-09-01T00:09:00+00:00",
                    "Value": 109
                }
            ]
        }
    }
    

    Example4 Getting the failed DNS requests of a site

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeDnsData
    <Common request parameters>
    
    {
        "StartTime": "2020-09-01T00:00:00+00:00",
        "EndTime": "2020-09-01T00:09:59+00:00",
        "Filters": [
            {
                "Name": "zone",
                "Values": [
                    "tencent.com"
                ]
            },
            {
                "Name": "code",
                "Values": [
                    "NXDomain",
                    "NotImp",
                    "Refused"
                ]
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "9cc50b24-7dc5-44f4-96ce-95825d53ff2f",
            "Data": [
                {
                    "Time": "2020-09-01T00:00:00+00:00",
                    "Value": 101
                },
                {
                    "Time": "2020-09-01T00:01:00+00:00",
                    "Value": 102
                },
                {
                    "Time": "2020-09-01T00:02:00+00:00",
                    "Value": 103
                },
                {
                    "Time": "2020-09-01T00:03:00+00:00",
                    "Value": 104
                },
                {
                    "Time": "2020-09-01T00:04:00+00:00",
                    "Value": 105
                },
                {
                    "Time": "2020-09-01T00:05:00+00:00",
                    "Value": 0
                },
                {
                    "Time": "2020-09-01T00:06:00+00:00",
                    "Value": 0
                },
                {
                    "Time": "2020-09-01T00:07:00+00:00",
                    "Value": 107
                },
                {
                    "Time": "2020-09-01T00:08:00+00:00",
                    "Value": 108
                },
                {
                    "Time": "2020-09-01T00:09:00+00:00",
                    "Value": 109
                }
            ]
        }
    }
    

    Example5 Getting all DNS requests made with A records by a site

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeDnsData
    <Common request parameters>
    
    {
        "StartTime": "2020-09-01T00:00:00+00:00",
        "EndTime": "2020-09-01T00:09:59+00:00",
        "Filters": [
            {
                "Name": "zone",
                "Values": [
                    "tencent.com"
                ]
            },
            {
                "Name": "type",
                "Values": [
                    "A"
                ]
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "9cc50b24-7dc5-44f4-96ce-95825d53ff2f",
            "Data": [
                {
                    "Time": "2020-09-01T00:00:00+00:00",
                    "Value": 101
                },
                {
                    "Time": "2020-09-01T00:01:00+00:00",
                    "Value": 102
                },
                {
                    "Time": "2020-09-01T00:02:00+00:00",
                    "Value": 103
                },
                {
                    "Time": "2020-09-01T00:03:00+00:00",
                    "Value": 104
                },
                {
                    "Time": "2020-09-01T00:04:00+00:00",
                    "Value": 105
                },
                {
                    "Time": "2020-09-01T00:05:00+00:00",
                    "Value": 0
                },
                {
                    "Time": "2020-09-01T00:06:00+00:00",
                    "Value": 0
                },
                {
                    "Time": "2020-09-01T00:07:00+00:00",
                    "Value": 107
                },
                {
                    "Time": "2020-09-01T00:08:00+00:00",
                    "Value": 108
                },
                {
                    "Time": "2020-09-01T00:09:00+00:00",
                    "Value": 109
                }
            ]
        }
    }
    

    5. Developer Resources

    SDK

    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
    OperationDenied Operation denied.
    ResourceNotFound The resource doesn’t exist.
    UnauthorizedOperation.CamUnauthorized CAM is not authorized.
    UnauthorizedOperation.NoPermission The sub-account is not authorized for the operation. Please get permissions first.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support