> 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/sdn/cloud-router/describecloudrouterdctodctraffic.md).

# DescribeCloudRouterDCToDCTraffic

## 1. API Description

This API (DescribeCloudRouterDCToDCTraffic) is used to query Data Center to Data Center Traffic

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

* Data center information for access points in the Cloud Router can be obtained via the [DescribeCloudRouters](https://github.com/zenlayer/zenlayercloud-api-doc-en/tree/main/sdn/cloud-router/describe-cloud-routers.md) API.
* The span between the start time and end time cannot exceed one day.
* Only traffic data within the last 30 days can be queried.
* This API aggregates bandwidth by data center and cannot distinguish the traffic of individual access points within the same data center. For example, when querying bandwidth from data center A to Z, the result returned is the sum of all access points in A to Z, and the bandwidth between a specific access point and another cannot be obtained separately.
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name  | Required | Type   | Description                                                                     |
| --------------- | -------- | ------ | ------------------------------------------------------------------------------- |
| cloudRouterId   | Yes      | String | Cloud Router ID.                                                                |
| sourceDcId      | Yes      | String | Source data center ID.                                                          |
| destinationDcId | Yes      | String | Destination data center ID.                                                     |
| startTime       | Yes      | String | Query start time, in ISO 8601 format, UTC timezone.                             |
| endTime         | No       | String | Query end time, in ISO 8601 format, UTC timezone. Defaults to the current time. |

## 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 [TrafficData](/api-reference/networking/sdn/datastructure.md#trafficdata) | List of traffic data points.                                                                                          |
| in95           | Integer                                                                            | Inbound 95th percentile peak traffic.                                                                                 |
| inAvg          | Integer                                                                            | Average inbound traffic.                                                                                              |
| inMax          | Integer                                                                            | Maximum inbound traffic.                                                                                              |
| inMin          | Integer                                                                            | Minimum inbound traffic.                                                                                              |
| out95          | Integer                                                                            | Outbound 95th percentile peak traffic.                                                                                |
| outAvg         | Integer                                                                            | Average outbound traffic.                                                                                             |
| outMax         | Integer                                                                            | Maximum outbound traffic.                                                                                             |
| outMin         | Integer                                                                            | Minimum outbound traffic.                                                                                             |
| unit           | String                                                                             | Traffic unit, e.g. bps.                                                                                               |

## 4. Code Example

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

1. **Query the data center-to-data center traffic data in a Cloud Router over one day.**

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

Request:
{
    "cloudRouterId": "your-cloudrouter-id",
    "sourceDcId": "source-dc-id",
    "destinationDcId": "destination-dc-id",
    "startTime": "2026-01-01T00:00:00Z",
    "endTime": "2026-01-01T23:59:59Z"
}

Response:
{
  "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
  "response": {
    "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
    "dataList": [
      {
        "time": "2026-01-01T00:00:00Z",
        "internetRX": 873034,
        "internetTX": 11971
      },
      {
        "time": "2026-01-01T00:05:00Z",
        "internetRX": 873034,
        "internetTX": 11971
      },
      {
        "time": "2026-01-01T00:10:00Z",
        "internetRX": 635218,
        "internetTX": 9028
      }
    ],
    "in95": 873034,
    "inAvg": 793762,
    "inMax": 873034,
    "inMin": 635218,
    "out95": 11971,
    "outAvg": 10990,
    "outMax": 11971,
    "outMin": 9028,
    "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\_DATACENTER\_NOT\_FOUND | The specified data center does not exist. |
