> 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/networking/cdn/analysis/describebandwidth.md).

# DescribeBandwidth

## 1. API Description

This interface (DescribeBandwidth) is used to query CDN bandwidth, data aggregation internval is 5 minutes.

#### Preparations

* Query billing regions: Call [`DescribeBillingRegions`](/api-reference/networking/cdn/common/describebillingregions.md).

## 2. Request Parameters

The following request parameter list only includes the required parameters for the interface

| Parameter Name | Required | Type   | Description                                                                                                                                                                                                                         |
| -------------- | -------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| startTime      | Yes      | String | The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. For example, 2024-08-22T00:00:00Z.                                                 |
| endTime        | Yes      | String | The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. For example, 2024-08-22T00:10:00Z. Note: The end time must be later than the start time. |
| domain         | No       | String | domain, use commas(,) to separate multiple domain names. By default, all acceleration domains will be queried.                                                                                                                      |
| region         | No       | String | [Billing region](/api-reference/networking/cdn/common/describebillingregions.md)                                                                                                                                                    |
| protocol       | No       | String | [Protocol Type](/api-reference/networking/cdn/datastructure.md#protocolvalue)                                                                                                                                                       |

## 3. Output Parameterss

| Parameter Name | Type                                                                                 | Description                                                                         |
| -------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| dataSet        | Array of [BandwithData](/api-reference/networking/cdn/datastructure.md#bandwithdata) | Bandwidth data(Unit Mbps)                                                           |
| requestId      | String                                                                               | Unique request ID. Each request returns it. Provide this ID when locating problems. |

## 4. Code Example

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

1. **Query CDN bandwidth.**

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

Request:
{
    "startTime": "2024-08-22T00:00:00Z",
    "endTime": "2024-08-22T01:00:00Z"
}

Response:
{
    "requestId": "T72DC2D08-XXXX-XXXX-XXXX-60567E6E53B8",
    "dataSet": [
        {
            "data": [
                {
                    "time": "2024-08-22T00:00:00Z",
                    "value": 4173.58
                },
                {
                    "time": "2024-08-22T00:05:00Z",
                    "value": 4792.3
                },
                {
                    "time": "2024-08-22T00:10:00Z",
                    "value": 4105.91
                },
                {
                    "time": "2024-08-22T00:15:00Z",
                    "value": 4373.59
                },
                {
                    "time": "2024-08-22T00:20:00Z",
                    "value": 5101.28
                },
                {
                    "time": "2024-08-22T00:25:00Z",
                    "value": 5980.99
                },
                {
                    "time": "2024-08-22T00:30:00Z",
                    "value": 5934.21
                },
                {
                    "time": "2024-08-22T00:35:00Z",
                    "value": 6283.05
                },
                {
                    "time": "2024-08-22T00:40:00Z",
                    "value": 6121.99
                },
                {
                    "time": "2024-08-22T00:45:00Z",
                    "value": 6609.52
                },
                {
                    "time": "2024-08-22T00:50:00Z",
                    "value": 6191.17
                },
                {
                    "time": "2024-08-22T00:55:00Z",
                    "value": 5513.65
                }
            ],
            "domain": "www.xxx.com",
            "region": "ALL"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## 5. Error Codes

The following includes error codes encountered in business logic. For other error codes, see [Common Error Codes](/api-reference/api-introduction/instruction/commonerrorcode.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/api-reference/networking/cdn/analysis/describebandwidth.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
