> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/cn/networking/zga/accelerator/describeacceleratorsalerts.md).

# DescribeAcceleratorsAlerts

## 1. 接口描述

本接口(DescribeAcceleratorsAlerts)用于查询加速器警报。

## 2. 请求参数

以下请求参数列表仅列出了接口中需要的请求参数

| 参数名称            | 必选 | 类型                                                                      | 描述                                                                                                                      |
| --------------- | -- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| acceleratorIds  | 否  | Array of String                                                         | <p>加速器IDs。</p><p>最多支持100个ID查询。</p>                                                                                      |
| resourceGroupId | 否  | String                                                                  | <p>资源组的ID。</p><p>如果不传，则返回该用户可见资源组的加速器警告。</p>                                                                            |
| alertType       | 否  | String                                                                  | [警报类型](/api-reference/cn/networking/zga/datastructure.md#acceleratealerttype)                                           |
| alertId         | 否  | String                                                                  | 警报Id                                                                                                                    |
| firing          | 否  | Boolean                                                                 | <ul><li>null-所有警报信息</li><li>true-正在告警的警报信息</li><li>false-已恢复的警报信息</li></ul>                                             |
| startTimeFrom   | 否  | [Timestamp](/api-reference/cn/api-introduction/instruction/datatype.md) | <p>开始时间范围, 查询警报开始时间。</p><p>按照<code>ISO8601</code>标准表示，并且使用<code>UTC</code>时间。格式为：<code>YYYY-MM-DDThh:mm:ssZ</code>。</p> |
| startTimeTo     | 否  | [Timestamp](/api-reference/cn/api-introduction/instruction/datatype.md) | <p>结束时间范围, 查询警报开始时间。</p><p>按照<code>ISO8601</code>标准表示，并且使用<code>UTC</code>时间。格式为：<code>YYYY-MM-DDThh:mm:ssZ</code>。</p> |
| endTimeFrom     | 否  | [Timestamp](/api-reference/cn/api-introduction/instruction/datatype.md) | <p>开始时间范围, 查询警报恢复时间。</p><p>按照<code>ISO8601</code>标准表示，并且使用<code>UTC</code>时间。格式为：<code>YYYY-MM-DDThh:mm:ssZ</code>。</p> |
| endTimeTo       | 否  | [Timestamp](/api-reference/cn/api-introduction/instruction/datatype.md) | <p>结束时间范围, 查询警报恢复时间。</p><p>按照<code>ISO8601</code>标准表示，并且使用<code>UTC</code>时间。格式为：<code>YYYY-MM-DDThh:mm:ssZ</code>。</p> |
| pageSize        | 否  | Integer                                                                 | <p>返回的分页大小。</p><p>默认为20，最大为1000。</p>                                                                                    |
| pageNum         | 否  | Integer                                                                 | <p>返回的分页数。</p><p>默认为1。</p>                                                                                              |

## 3. 响应结果

| 参数名称       | 类型                                                                                              | 描述                                         |
| ---------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------ |
| requestId  | String                                                                                          | 唯一请求 ID，每次请求都会返回。定位问题时需要提供该次请求的 requestId。 |
| totalCount | Integer                                                                                         | 符合条件的数据总数。                                 |
| dataSet    | Array of [AcceleratorAlert](/api-reference/cn/networking/zga/datastructure.md#acceleratoralert) | 结果集。                                       |

## 4. 代码示例

{% tabs %}
{% tab title="示例" %}

1. **查询加速器警报列表**

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

Request:
{
    "acceleratorIds": ["acceleratorIdxxxxx"],
}

Response:
{
  "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
  "response": {
    "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
    "totalCount": 2,
    "dataSet": [
      {
        "acceleratorId": "acceleratorIdxxxxx",
        "alertId": "156445fa677088d5cc344b751b252df9",
        "alertType": "VipDetectionNotAvaliable",
        "message": "101.101.101.101",
        "startTime": "2024-01-19T04:11:29.577Z",
        "endTime": "2024-03-08T06:25:46.067Z"
      },
      {
        "acceleratorId": "acceleratorIdxxxxx",
        "alertId": "156445fa677088d5cc344b751b252df8",
        "alertType": "VipDetectionNotAvaliable",
        "message": "101.101.101.102",
        "startTime": "2024-01-19T04:11:29.577Z",
        "endTime": "2024-03-08T06:25:46.067Z"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. 开发者工具

Zenlayer Cloud API 2.0 提供了配套的[开发工具集（SDK）](/api-reference/cn/api-introduction/toolkit.md)，未来会陆续支持更多开发语言，方便快速接入和使用Zenlayer的产品和服务。

## 6. 错误码

下面包含业务逻辑中遇到的错误码，其他错误码见[公共错误码](/api-reference/cn/api-introduction/instruction/commonerrorcode.md)
