---
title: "Return cPanel account's bandwidth usage report"
method: GET
path: "/Bandwidth/query"
tags: ["Bandwidth"]
---

# Return cPanel account's bandwidth usage report

`GET /Bandwidth/query`

This function queries an account's bandwidth data and returns a report.

**Note:**

This function also returns the bandwidth use of a [distributed cPanel account](https://go.cpanel.net/cPanelGlossary#distributed-cpanel-account).

## Query parameters

- `grouping` union, required
  - 'domain' | 'protocol'
  - 'year' | 'year_month' | 'year_month_day' | 'year_month_day_hour' | 'year_month_day_hour_minute'
- `domains` string, domain
- `end` integer
- `interval` 'daily' | 'hourly' | '5min'
- `protocols` string
- `start` integer
- `timezone` string, olson_timezone_name

## 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 — The function returns data in a hierarchy of objects that the order of values in the `grouping` parameter determines. For example: * `domain` - Returns data by domain. * `domain|protocol` - Returns data by protocol and nests it within the object for each domain. * `domain|year` - Returns data by year and nests it within the object for each domain. * `year|domain` - Returns data by domain and nests it within object for each year. * `domain|year|protocol` - Returns data by protocol and nests it within object for each year, which the result then nests in objects for each domain. The deepest child object contains the bandwidth data in bytes.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` unknown
    - `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)
