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

# DescribeBandwidthClusterUsage

## 1. API Description

This API (DescribeBandwidthClusterUsage) is used to query usage information for a bandwidth cluster.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name     | Required | Type    | Description                                             |
| ------------------ | -------- | ------- | ------------------------------------------------------- |
| bandwidthClusterId | Yes      | String  | ID of bandwidth cluster.                                |
| pageSize           | No       | Integer | <p>The returned page size.</p><p>Default value: 20.</p> |
| pageNum            | No       | Integer | <p>Number of pages returned.</p><p>Default value: 1</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> |
| totalCount     | Integer                                                                                                 | Number of results meeting the filtering conditions.                                                                   |
| dataSet        | Array of [BandwidthClusterUsageData](/api-reference/traffic/datastructure.md#bandwidthclusterusagedata) | Bandwidth usage dataset.                                                                                              |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Query usage information for a bandwidth cluster.**

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

Request：
{
  "bandwidthClusterId": "bandwidthClusterId",
  "pageNum": 1,
  "pageSize": 20
}

Response：
{
  "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
  "response": {
    "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
    "totalCount": 30,
    "dataSet": [
      {
        "time": "2024-01-01",
        "value": 100.50,
        "details": [
          {
            "cityName": "Los Angeles",
            "cityCode": "LAX",
            "product": "BMC",
            "value": 50.25
          },
          {
            "cityName": "Singapore",
            "cityCode": "SIN",
            "product": "BMC",
            "value": 50.25
          }
        ]
      },
      {
        "time": "2024-01-02",
        "value": 120.80,
        "details": [
          {
            "cityName": "Los Angeles",
            "cityCode": "LAX",
            "product": "BMC",
            "value": 60.40
          },
          {
            "cityName": "Singapore",
            "cityCode": "SIN",
            "product": "BMC",
            "value": 60.40
          }
        ]
      }
    ]
  }
}
```

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