> 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/zga/accelerator/describeacceleratortraffic.md). Agents can also search and read this documentation through its [MCP server](https://docs.console.zenlayer.com/api-reference/~gitbook/mcp).

# DescribeAcceleratorTraffic

## 1. API Description

This API (DescribeAcceleratorTraffic) is used to query accelerator traffic.

{% hint style="info" %}
**Notes**

* Bandwidth return value time granularity is 300s.
* Bandwidth and traffic data are obtained through acceleration log aggregation. Due to log collection delays, current bandwidth values may show 0 or be inaccurate. Generally, data before 15 minutes ago has no integrity issues. You can set endTime=(current time - 15 minutes) and query backwards in 5-minute multiples (see input parameter description). Due to possible data collection delays, each data point has a chance to be corrected within 24 hours. If you require 100% data integrity, you can call again after 24 hours for data coverage.
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API Input Parameters.

| Parameter Name     | Required | Type                                                                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------ | -------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| acceleratorId      | Yes      | String                                                                                                | Accelerator ID                                                                                                                                                                                                                                                                                                                                                                                 |
| accelerateRegionId | No       | String                                                                                                | Acceleration region ID                                                                                                                                                                                                                                                                                                                                                                         |
| listener           | No       | String                                                                                                | <p>Acceleration rule</p><ul><li>Single port: $protocol:$port, example: http:80.</li><li>Port range: $protocol:$portRange, example: tcp:80/100.</li></ul>                                                                                                                                                                                                                                       |
| startTime          | Yes      | [Timestamp](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/datatype.md) | <p>Query start time.</p><p>Uses the <code>ISO8601</code> standard and UTC time. Format: <code>YYYY-MM-ddTHH:mm:00Z</code>.</p><p>mm must be a multiple of 5, such as: 0/5/10/15/20/25/30/35/40/45/55. Example: 2025-06-11T00:05:00Z</p><p>Note:</p><ul><li>Start time must be less than end time</li><li>Returned time granularity: 300s.</li><li>Time range: \[startTime, endTime).</li></ul> |
| endTime            | Yes      | [Timestamp](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/datatype.md) | <p>Query end time.</p><p>Uses the <code>ISO8601</code> standard and UTC time. Format: <code>YYYY-MM-ddTHH:mm:00Z</code>.</p><p>mm must be a multiple of 5, such as: 0/5/10/15/20/25/30/35/40/45/55. Example: 2025-06-11T00:25:00Z</p><p>Note:</p><ul><li>Start time must be less than end time</li><li>Returned time granularity: 300s.</li><li>Time range: \[startTime, endTime).</li></ul>   |

## 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> |
| dataList       | Array of [AcceleratorTrafficData](https://docs.console.zenlayer.com/api-reference/zga/datastructure.md#acceleratortrafficdata) | Bandwidth data list                                                                                                   |
| inMax          | Integer                                                                                                                        | Maximum inbound bandwidth                                                                                             |
| inMin          | Integer                                                                                                                        | Minimum inbound bandwidth                                                                                             |
| inTotal        | Integer                                                                                                                        | Total inbound bandwidth traffic                                                                                       |
| outMax         | Integer                                                                                                                        | Maximum outbound bandwidth                                                                                            |
| outMin         | Integer                                                                                                                        | Minimum outbound bandwidth                                                                                            |
| outTotal       | Integer                                                                                                                        | Total outbound bandwidth traffic                                                                                      |
| unit           | String                                                                                                                         | Bandwidth unit. Example: bps                                                                                          |
| totalUnit      | String                                                                                                                         | Traffic unit. Example: B                                                                                              |

## 4. Code Examples

{% tabs %}
{% tab title="Example" %}

1. **Query accelerator traffic**

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

Request:
{
  "acceleratorId": "acceleratorIdxxxxx",
  "startTime": "2025-06-11T01:25:00Z",
  "endTime": "2025-06-11T02:25:00Z",
  "listener": "tcp:80/88",
  "accelerateRegionId": "DE"
}

Response:
{
  "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
  "response": {
    "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
      "dataList": [
          {
              "time": "2025-06-11T01:25:00Z",
              "in": 11.351999,
              "out": 105.423996
          },
          {
              "time": "2025-06-11T01:30:00Z",
              "in": 65.706665,
              "out": 360.82935
          },
          {
              "time": "2025-06-11T01:35:00Z",
              "in": 18.450666,
              "out": 108.328
          },
          {
              "time": "2025-06-11T01:40:00Z",
              "in": 48.86933,
              "out": 9.269333
          },
          {
              "time": "2025-06-11T01:45:00Z",
              "in": 0,
              "out": 0
          },
          {
              "time": "2025-06-11T01:50:00Z",
              "in": 26.605333,
              "out": 20.855999
          },
          {
              "time": "2025-06-11T01:55:00Z",
              "in": 0,
              "out": 0
          },
          {
              "time": "2025-06-11T02:00:00Z",
              "in": 119.856,
              "out": 609.51733
          },
          {
              "time": "2025-06-11T02:05:00Z",
              "in": 0,
              "out": 0
          },
          {
              "time": "2025-06-11T02:10:00Z",
              "in": 68.669334,
              "out": 110.088005
          },
          {
              "time": "2025-06-11T02:15:00Z",
              "in": 101.64,
              "out": 468.776
          },
          {
              "time": "2025-06-11T02:20:00Z",
              "in": 60.72,
              "out": 479.21866
          }
      ],
    "inMax": 119.856,
    "outMax": 609.51733,
    "inMin": 0,
    "outMin": 0,
    "inTotal": 19570.099762499998,
    "outTotal": 85211.5002375,
    "totalUnit": "B",
    "unit": "bps"
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/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

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

| HTTP Status Code | Error Code                                    | Description                        |
| ---------------- | --------------------------------------------- | ---------------------------------- |
| 400              | INVALID\_START\_TIME\_MUST\_BEFORE\_END\_TIME | Start time must be before end time |
