# 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="/pages/F5MYhQP0mi4q4jpNJwcx#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](/api-reference/api-introduction/toolkit/api-sdk.md) 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](/api-reference/api-introduction/instruction/commonerrorcode.md).​​


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/api-reference/security/alarm/events/describelogs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
