# DescribeDDosAllEventList

## 1. API Description

This API (DescribeDDosAllEventList) is used to get a list of DDoS attack events.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type                                                                                                       | Description                                                                                   |
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| status         | No       | [DdosAttackStatus](https://docs.console.zenlayer.com/api-reference/compute/datastructure#ddosattackstatus) | Attack state.                                                                                 |
| ipAddress      | No       | String                                                                                                     | Attacked target IP.                                                                           |
| startTime      | No       | String                                                                                                     | Attack start time.                                                                            |
| endTime        | No       | String                                                                                                     | Attack end time.                                                                              |
| pageSize       | No       | Integer                                                                                                    | <p>Number of items in the current page result.</p><p>Default: 20.</p><p>Default value: 20</p> |
| pageNum        | No       | Integer                                                                                                    | <p>Number of pages returned.</p><p>Default value: 1</p>                                       |

## 3. Output Parameters

| Parameter Name | Type                                                                                                              | Description                                                                                                           |
| -------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                                                            | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| totalCount     | Integer                                                                                                           | Number of disks meeting the filtering conditions.                                                                     |
| dataSet        | Array of [AttackEventInfo](https://docs.console.zenlayer.com/api-reference/compute/datastructure#attackeventinfo) | Data for the list of attack events.                                                                                   |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Get a list of attack events.**

```json
POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeDDosAllEventList
<Common Request Params>

Request：
{
    "status": "status",
    "ipAddress": "10.0.0.2"
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "totalCount": 1,
    "dataSet": [
        {
            "eventId": "<eventId>",
            "status": "ATTACKING",
            "ipAddress": "10.0.0.2",
            "protecting": true,
            "startTime": "2025-05-01T01:01:01Z",
            "endTime": "2025-05-01T01:01:01Z",
            "endBlackholeTime": "2025-05-01T01:01:01Z",
            "attackBandwidthMax": "2",
            "attackPackageMax": "2",
            "regionId": "asia-east-1a"
        }
      ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/api-reference/api-introduction/toolkit/api-sdk)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/commonerrorcode).

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |
