---
title: "Return bandwidth statistics for all domains"
method: GET
path: "/Stats/get_bandwidth"
tags: ["Stats", "Domain Statistics"]
---

# Return bandwidth statistics for all domains

`GET /Stats/get_bandwidth`

This function retrieves a list of bandwidth records for the domains on a cPanel account.

**Note:**

This function also returns the bandwidth use of a [distributed cPanel account](https://docs.cpanel.net/knowledge-base/cpanel-product/cpanel-glossary#distributed-cpanel-account).

**Warning:**

This function requires the _Bandwidth Stats_ feature. To enable this feature, use WHM's [_Feature Manager_](https://go.cpanel.net/whmdocsFeatureManager)
interface (_WHM >> Home >> Packages >> Feature Manager_).

## Query parameters

- `timezone` string

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object[]
      - `bytes` integer — The domain's bandwidth usage, in bytes.
      - `domain` string, domain — The domain for which to display bandwidth statistics. **Note:** The function only returns this value if the `protocol` return's value is `http`.
      - `month_start` integer — The beginning of the report window.
      - `protocol` 'http' | 'imap' | 'smtp' | 'pop3' | 'ftp' — The protocol for which to provide data. * `http` * `imap` * `smtp` * `pop3` * `ftp`
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
      - `transformed` 1 — Post-processing may have transformed the data.
    - `status` 0 | 1 — - 1 - Success - 0 - Failed: Check the errors field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/versions/632e2f8e6d04/schema)
