> 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/describeaccelerators.md).

# DescribeAccelerators

## 1. 接口描述

本接口(DescribeAccelerators)用于查询多个加速器的信息。用户可以根据ID、名称或者CNAME等条件来查询。

## 2. 请求参数

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

| 参数名称               | 必选 | 类型              | 描述                                                                                |
| ------------------ | -- | --------------- | --------------------------------------------------------------------------------- |
| acceleratorIds     | 否  | Array of String | <p>加速器ID。</p><p>最多支持100个ID查询。</p>                                                 |
| acceleratorName    | 否  | String          | 加速器名称                                                                             |
| acceleratorStatus  | 否  | String          | [加速器状态](/api-reference/cn/networking/zga/datastructure.md#acceleratorstatusvalue) |
| accelerateRegionId | 否  | String          | [区域Id](/api-reference/cn/networking/zga/datastructure.md#region)                  |
| vip                | 否  | String          | 分配的加速VIP                                                                          |
| domain             | 否  | String          | 加速域名                                                                              |
| origin             | 否  | String          | 源站地址                                                                              |
| originRegionId     | 否  | String          | [区域Id](/api-reference/cn/networking/zga/datastructure.md#region)                  |
| cname              | 否  | String          | 分配给加速器的 cname                                                                     |
| resourceGroupId    | 否  | String          | <p>资源组的ID。</p><p>如果不传，则返回该用户可见的所有资源组内的加速器。</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 [AcceleratorInfo](/api-reference/cn/networking/zga/datastructure.md#acceleratorinfo) | 结果集。                                       |

## 4. 代码示例

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

1. **分页查询加速器列表**

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

Request:
{
  "pageNum": 1,
  "pageSize": 1
}

Response:
{
  "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
  "response": {
    "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
    "totalCount": 6,
    "dataSet": [
          {
            "acceleratorId": "acceleratorIdxxxxx",
            "acceleratorType": "CustomRouting",
            "acceleratorName": "xx.xx.com_Singapore",
            "chargeType": "ByTrafficPackage",
            "acceleratorStatus": "Accelerating",
            "cname": "xxx.zga.globalconnetct.com",
            "domain": {
                "domain": "xx.xx.com",
                "relateDomains": "xx.xx.cn"
            },
            "origin": {
                "originRegionId": "SG",
                "originRegionName": "Singapore",
                "origin": "10.10.10.10",
                "backupOrigin": ""
            },
            "accelerateRegions": [
                {
                    "accelerateRegionId": "FR",
                    "accelerateRegionName": "France",
                    "status": "Success",
                    "vip": "101.101.101.101",
                    "bandwidth": 500
                }
            ],
            "l4Listeners": [
                {
                    "port": 53,
                    "backPort": 53,
                    "protocol": "udp"
                }
            ],
            "l7Listeners": [
                {
                    "port": 443,
                    "backPort": 443,
                    "host": "",
                    "backProtocol": "https",
                    "protocol": "https"
                }
            ],
            "protocolOpts": {
                "toa": false,
                "toaValue": 253,
                "websocket": false,
                "proxyProtocol": false,
                "gzip": false,
                "sniCheck": false,
                "httpRedirect": false
            },
            "certificate": {
                "certificateId": "certificateIdxxxxx",
                "certificateLabel": "certificatexxx",
                "common": "*.xx.com",
                "fingerprint": "1D7801BBE772D5DE55CBF1F88AEB41A42402DA07",
                "issuer": "TrustAsia TLS RSA CA",
                "sans": ["xx.cn"],
                "algorithm": "RSA",
                "createTime": "2023-04-19T09:11:27Z",
                "startTime": "2023-04-18T09:27:30Z",
                "endTime": "2023-07-18T09:27:30Z",
                "expired": false
            },
            "accessControl": {
                "enable": true,
                "rules": [
                  {
                    "listener": "http:80",
                    "directory": "*",
                    "cidrIp": "101.101.101.101",
                    "policy": "accept"
                  }
                ]
            },
            "healthCheck": {
              "enable": true,
              "alarm": true,
              "port": 80
            },
            "createTime": "2023-04-28T03:38:53Z",
            "resourceGroupId":"xxx-xx"
          }
    ]
  }
}
```

{% 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)
