# DescribeDDosEventDetail

## 1. API Description

This API (DescribeDDosEventDetail) is used to get details of a DDoS attack event.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type   | Description                        |
| -------------- | -------- | ------ | ---------------------------------- |
| eventId        | Yes      | String | The unique ID of the attack event. |
| regionId       | Yes      | String | Region ID.                         |

## 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> |
| eventId               | String                                                                                                       | The unique ID of the attack event.                                                                                    |
| status                | [DdosAttackStatus](https://docs.console.zenlayer.com/api-reference/compute/datastructure#ddosattackstatus)   | Attack state.                                                                                                         |
| type                  | [DdosProtectedType](https://docs.console.zenlayer.com/api-reference/compute/datastructure#ddosprotectedtype) | Attack type.                                                                                                          |
| ipAddress             | String                                                                                                       | Attacked target IP.                                                                                                   |
| protecting            | Boolean                                                                                                      | Whether the IP is being protected.                                                                                    |
| startTime             | String                                                                                                       | Attack start time.                                                                                                    |
| endTime               | String                                                                                                       | Attack end time.                                                                                                      |
| endBlackholeTime      | String                                                                                                       | Time to unblock from blackhole.                                                                                       |
| attackBandwidthMax    | Float                                                                                                        | Peak attack bandwidth. Unit: bps.                                                                                     |
| protectedBandwidthMax | Float                                                                                                        | Peak mitigation bandwidth. Unit: bps.                                                                                 |
| attackPackageMax      | Float                                                                                                        | Peak attack packet rate. Unit: pps.                                                                                   |
| protectedPackageMax   | Float                                                                                                        | Peak mitigation packet rate. Unit: pps.                                                                               |
| sourceIp              | Array of String                                                                                              | Attack source IP.                                                                                                     |
| sourcePort            | Array of [TopPort](https://docs.console.zenlayer.com/api-reference/compute/datastructure#topport)            | Attack source port.                                                                                                   |
| desertionPort         | Array of [TopPort](https://docs.console.zenlayer.com/api-reference/compute/datastructure#topport)            | Attack target port.                                                                                                   |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Get attack event details.**

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

Request：
{
    "eventId": "<eventId>",
    "regionId": "regionId"
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "eventId": "<eventId>",
    "status": "ATTACKING",
    "type": "DDOS",
    "ipAddress": "10.0.0.1",
    "protecting": true,
    "startTime": "2025-05-01T01:01:01Z",
    "endTime": "2025-05-01T01:01:01Z",
    "endBlackholeTime": "2025-05-01T01:01:01Z",
    "attackBandwidthMax": 2,
    "protectedBandwidthMax": 2,
    "attackPackageMax": 2,
    "protectedPackageMax": 2,
    "sourceIp": null,
    "sourcePort": null,
    "desertionPort": null
  }
}
```

{% 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                                 |
| ---------------- | ---------------------------------------- | ------------------------------------------- |
| 404              | INVALID\_REGION\_NOT\_FOUND              | Specified availability zone does not exist. |
| 404              | INVALID\_DDOS\_ATTACK\_EVENT\_NOT\_FOUND | DDoS attack event does not exist.           |
