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

# DescribeRankingBandwidth

## 1. API Description

This interface (DescribeRankingBandwidth) is used to query CDN access bandwidth rankings. Display up to 100 domain names.

## 2. Request Parameters

The following request parameter list includes only those required by 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.                                                 |
| 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. Note: The end time must be later than the start time. |

## 3. Output Parameters

| Parameter Name | Type                                                                                               | Description                                                                         |
| -------------- | -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| dataSet        | Array of [RankingBandwithData](/api-reference/networking/cdn/datastructure.md#rankingbandwithdata) | Bandwidth rankings.                                                                 |
| requestId      | String                                                                                             | Unique request ID returned with each request. Provide this ID when locating issues. |

## 4. Code Example

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

1. **Query CDN access bandwidth rankings.**

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

Request:
{
    "startTime": "2022-09-21T02:00:00Z",
    "endTime": "2022-09-21T03:30:00Z"
}

Response:
{
    "requestId": "T6883FCD0-3E7D-44EA-A517-A421A52A27F4",
    "response": {
        "requestId": "T6883FCD0-3E7D-44EA-A517-A421A52A27F4",
        "dataSet": [{
            "maxbandwidth": 8.98,
            "domain": "testcdn.ddd520.com",
            "requests": 250,
            "time": "2022-09-21T03:25:00Z",
            "traffic": 415.34
        }, {
            "maxbandwidth": 2.1,
            "domain": "*.ddd520.com",
            "requests": 8,
            "time": "2022-09-21T02:10:00Z",
            "traffic": 21.19
        }]
    }
}

```

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