tencent cloud

APIs

DescribeDDoSAttackData

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-11-25 16:59:54

1. API Description

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

This API is used to query DDoS attack time-series data.

A maximum of 100 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: DescribeDDoSAttackData.
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

Start time, which adopts Coordinated Universal Time (UTC) and follows the date and time format of the ISO 8601 standard.

EndTime Yes Timestamp ISO8601

End time. The time is in Coordinated Universal Time (UTC), following the ISO 8601 standard date and time format. The query time range (EndTime - StartTime) must be less than or equal to 31 days.

MetricNames.N Yes Array of String

List of statistical metrics. Fill in at least 1, and duplication is not allowed.

Enumeration values:

  • ddos_attackMaxBandwidth: Peak attack bandwidth, in bps;
  • ddos_attackMaxPackageRate: Peak attack packet rate, in pps;
  • ddos_attackBandwidth: Attack bandwidth curve, in bps;
  • ddos_attackPackageRate: Attack packet rate curve, in pps.
ZoneIds.N Yes Array of String

Site ID set. This parameter will change from optional to required after May 30, 2024. For details, see the announcement: [Tencent Cloud EdgeOne] Cloud API Change Notification. You can import up to 100 site IDs. To query all site data under the Tencent Cloud root account, use * instead. To query account-level data, you must have permission for all site resources of this interface.

PolicyIds.N No Array of Integer

List of DDoS policy group IDs. If not specified, all policy IDs are selected by default.

Interval No String

Query time granularity. If this parameter is not input, the granularity will be automatically inferred based on the interval between the start time and end time. Specifically, the granularity value is min, 5min, hour, and day respectively for queries of data within 1 hour, within 2 days, within 7 days, and over 7 days.

Enumeration values:

  • min: 1 minute;
  • 5min: 5 minutes;
  • hour: 1 hour;
  • day: 1 day.
Area No String

Data ownership region.

Enumeration values:

  • overseas: global data (excluding the Chinese mainland);
  • mainland: data in the Chinese mainland;
  • global: global data.

Default value: global

Filters.N No Array of QueryCondition

Filter conditions. The maximum number of QueryCondition.Value collections is 20. The detailed filter conditions for QueryCondition.Key values are as follows:

  • ddos-attack-dip: filter by DDoS attack destination IP. QueryCondition.Operator only supports equals.
  • 3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer

    Total number of entries in the query result.

    Data Array of SecEntry

    List of DDoS attack data content.

    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Querying time series data of DDoS attack bandwidth

    Query the DDoS attack bandwidth time series data of the attacked destination IP at the selected site with ZoneId zone-2psss4drfg29 at a data statistics granularity of one minute.

    Input Example

    POST / HTTP/1.1
    Host: teo.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeDDoSAttackData
    <Common request parameters>
    
    {
        "StartTime": "2025-08-22T00:00:00+00:00",
        "EndTime": "2025-08-22T00:00:59+00:00",
        "MetricNames": [
            "ddos_attackBandwidth"
        ],
        "ZoneIds": [
            "zone-2psss4drfg29"
        ],
        "PolicyIds": [
            1706
        ],
        "Interval": "min",
        "Filters": [
            {
                "Key": "ddos-attack-dip",
                "Operator": "equals",
                "Value": [
                    "1**.2*.1**.1*"
                ]
            }
        ]
    }

    Output Example

    {
        "Response": {
            "Data": [
                {
                    "Key": "ddos_attackBandwidth",
                    "Value": [
                        {
                            "Avg": 100,
                            "Detail": [
                                {
                                    "Timestamp": 1755820800,
                                    "Value": 100
                                }
                            ],
                            "Max": 100,
                            "Metric": "ddos_attackBandwidth",
                            "Sum": 100
                        }
                    ]
                }
            ],
            "TotalCount": 1,
            "RequestId": "60b91eaf-e560-4b59-a388-61d85b637f34"
        }
    }

    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
    FailedOperation Operation failed.
    InternalError.ProxyServer Unknown error occurs on the real server.
    LimitExceeded The quota limit is exceeded.
    LimitExceeded.QueryTimeLimitExceeded Query time range exceeds the limit.
    ResourceNotFound The resource does not exist.
    UnauthorizedOperation.CamUnauthorized Unauthorized Cam operation.
    UnauthorizedOperation.NoPermission The sub-account does not have operation permissions. Add the required permissions and try again.

    ヘルプとサポート

    この記事はお役に立ちましたか?

    フィードバック