# DescribeIpBlockEvents

## 1. API Description

This API is used to query information on IP blocking event.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

<table><thead><tr><th width="194.3012048192771">Parameter Name</th><th width="119">Required</th><th width="125">Type</th><th>Description</th></tr></thead><tbody><tr><td>startTime</td><td>Yes</td><td>Timestamp</td><td><p>Start time.</p><p>Format: <code>yyyy-MM-ddTHH:mm:ssZ</code>.</p></td></tr><tr><td>endTime</td><td>Yes</td><td>Timestamp</td><td><p>End time.</p><p>Format: <code>yyyy-MM-ddTHH:mm:ssZ</code>.</p></td></tr><tr><td>ip</td><td>No</td><td>String</td><td>Blocked IP address.</td></tr></tbody></table>

## 3. Output Parameters

<table><thead><tr><th width="199.33333333333331">Parameter Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>requestId</td><td>String</td><td>The unique request ID, which is returned for each request. RequestId is required for locating a problem.</td></tr><tr><td>dataList</td><td>Array of <a href="../../data-types#ipblockeventinfo">IpBlockEventInfo</a></td><td>Information on IP blocking event.</td></tr></tbody></table>

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Queries** **information on IP blocking event.**

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

Request:
{
    "startTime":"2023-07-26T16:00:00Z",
    "endTime":"2023-08-03T15:59:59Z",
    "ip":"10.1.1.1"
}

Response:
{
  "requestId": "T83B6A963-B111-4BF9-8466-1C3351E2DFD1",
  "dataList": [
        {
            "ip": "10.1.1.1",
            "region": "area-shanghai-1",
            "resourceGroup": "resourceGroup-1",
            "blockTime": "2023-07-28T16:00:00Z",
            "unblockTime": "2023-07-29T16:00:00Z",
            "divertMode": "automatically"
        }
 ]
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources <a href="#id-5.-kai-fa-zhe-gong-ju" id="id-5.-kai-fa-zhe-gong-ju"></a>

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

## 6. Error Codes

No error codes related to the API business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/test/ci-develop-en/api-introduction/instruction/commonerrorcode).​​
