v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
Bandwidth

Return cPanel account's bandwidth usage report

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.

get/Bandwidth/query

Query parameters

'domain' | 'protocol' required
OR
'year' | 'year_month' | 'year_month_day' | 'year_month_day_hour' | 'year_month_day_hour_minute' required

How to group the data in the report, in pipe-separated format. This list must contain one or both of the following parameters:

A pipe-separated list that contains one or both of the following parameters:

  • domain
  • protocol

This parameter can also include only one of the following start time interval types:

  • year
  • year_month
  • year_month_day
  • year_month_day_hour
  • year_month_day_mour_minute

Note:

  • This parameter accepts a maximum of three values.
  • The function nests the return objects in the order that you declare the values in this parameter.
domainsstring domain

A pipe-separated list of domains for which to provided data.

Note:

  • If you do not include this parameter, the function will return data for all domains on the cPanel account.
  • The UNKNOWN "pseudo-domain" refers to data recorded without a specific domain. All traffic except HTTP traffic is recorded without a specific domain.
endinteger
Example:1446664809

The end date of the report window.

interval'daily' | 'hourly' | '5min'
Example:daily

Length of time between bandwidth data samples.

  • daily
  • hourly
  • 5min

Note:

The interval's retention period determines availability of the interval's data. Use the Bandwidth::get_retention_periods API to determine an interval's retention period.

protocolsstring

A pipe-separated list of the protocols for which to provide data.

  • http
  • imap
  • smtp
  • pop3
  • ftp
startinteger
Example:1445664609

The start date of the report window.

timezonestring olson_timezone_name
Example:America/Chicago

The timezone in which to report the data.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "query",
  "module": "Bandwidth",
  "result": {
    "status": 1
  }
}