> 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/traffic/bandwidth-cluster/describebandwidthclustertraffic.md).

# DescribeBandwidthClusterTraffic

## 1. API Description

This API (DescribeBandwidthClusterTraffic) is used to query bandwidth information of a bandwidth cluster in the specified date range.

{% hint style="info" %} <mark style="color:blue;">**Note**</mark>

* <mark style="color:blue;">Only the date range of 24 hours are supported.</mark>
* <mark style="color:blue;">Only the bandwidth information within 30 days are supported to query.</mark>
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name     | Required | Type                                                                                 | Description                                                                                                                                                                                                                                                                                                                           |
| ------------------ | -------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| bandwidthClusterId | Yes      | String                                                                               | Bandwidth cluster ID.                                                                                                                                                                                                                                                                                                                 |
| startTime          | Yes      | String                                                                               | <p>Start time.</p><p>Use UTC time according to the ISO8601 standard. Format: YYYY-MM-ddTHH:mm:ssZ.</p>                                                                                                                                                                                                                                |
| endTime            | Yes      | String                                                                               | <p>End time.</p><p>Use UTC time according to the ISO8601 standard. Format: YYYY-MM-ddTHH:mm:ssZ.</p>                                                                                                                                                                                                                                  |
| city               | No       | String                                                                               | <p>Filter by city, such as LAX.</p><p>This value can be the name of the city or the city code.</p><p>By specifying this value, only the bandwidth traffic data for that city will be returned.</p><p>The city code and city name of the current bandwidth cluster can be viewed in the cities field of DescribeBandwidthClusters.</p> |
| trafficType        | No       | [BandwidthTrafficType](/api-reference/traffic/datastructure.md#bandwidthtraffictype) | <p>Filter by traffic type.</p><p>Available values: <code>LOCAL</code> (domestic), <code>INTERNATIONAL</code> (international).</p><p>Only supported for PathBasedBandwidth bandwidth clusters.</p>                                                                                                                                     |

## 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 [BandwidthClusterTrafficData](/api-reference/traffic/datastructure.md#bandwidthclustertrafficdata) | List of bandwidth data.                                                                                               |
| in95                    | Integer                                                                                                     | Inbound burstable 95th bandwidth.                                                                                     |
| in95Time                | String                                                                                                      | <p>Time of inbound burstable 95th bandwidth.</p><p>Format: YYYY-MM-ddTHH:mm:ssZ.</p>                                  |
| inAvg                   | Integer                                                                                                     | Average value of inbound bandwidth.                                                                                   |
| inMax                   | Integer                                                                                                     | Maximum value of inbound bandwidth.                                                                                   |
| inMin                   | Integer                                                                                                     | Minimum value of inbound bandwidth.                                                                                   |
| inTotal                 | Integer                                                                                                     | Total data transfer of inbound bandwidth.                                                                             |
| out95                   | Integer                                                                                                     | Outbound burstable 95th bandwidth.                                                                                    |
| out95Time               | String                                                                                                      | <p>Time of outbound burstable 95th bandwidth.</p><p>Format: YYYY-MM-ddTHH:mm:ssZ.</p>                                 |
| outAvg                  | Integer                                                                                                     | Average value of outbound bandwidth.                                                                                  |
| outMax                  | Integer                                                                                                     | Maximum value of outbound bandwidth.                                                                                  |
| outMin                  | Integer                                                                                                     | Minimum value of outbound bandwidth.                                                                                  |
| outTotal                | Integer                                                                                                     | Total data transfer of outbound bandwidth.                                                                            |
| maxBandwidth95ValueMbps | Float                                                                                                       | Maximum inbound burstable 95th bandwidth. Unit: Mbps.                                                                 |
| totalUnit               | String                                                                                                      | Unit of data transfer. For example, B.                                                                                |
| unit                    | String                                                                                                      | Unit of bandwidth. For example, bps.                                                                                  |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query the bandwidth information of a bandwidth cluster in one day.**

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

Request:
{
  "bandwidthClusterId": "bandwidthClusterId",
  "startTime": "2024-01-01T00:00:00Z",
  "endTime": "2024-01-01T23:59:59Z"
}

Response:
{
  "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
  "response": {
    "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
    "dataList": [
      {
        "internetRX": 873034,
        "internetTX": 11971,
        "time": "2024-01-01T00:00:00Z"
      },
      {
        "internetRX": 873034,
        "internetTX": 11971,
        "time": "2024-01-01T00:05:00Z"
      },
      {
        "internetRX": 635218,
        "internetTX": 9028,
        "time": "2024-01-01T00:10:00Z"
      }
    ],
    "in95": 873034,
    "in95Time": "2024-01-01T00:00:00Z",
    "inAvg": 793762,
    "inMax": 873034,
    "inMin": 635218,
    "inTotal": 89298270,
    "maxBandwidth95ValueMbps": 0.88,
    "out95": 11971,
    "out95Time": "2024-01-01T00:00:00Z",
    "outAvg": 10990,
    "outMax": 11971,
    "outMin": 9028,
    "outTotal": 1236457,
    "totalUnit": "B",
    "unit": "bps"
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

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

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code                   | Description                       |
| ---------------- | ---------------------------- | --------------------------------- |
| 404              | INVALID\_CLUSTER\_NOT\_FOUND | Bandwidth cluster does not exist. |
