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.
Query parameters
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.
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.
The end date of the report window.
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.
A pipe-separated list of the protocols for which to provide data.
- http
- imap
- smtp
- pop3
- ftp
The start date of the report window.
The timezone in which to report the data.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "query",
"module": "Bandwidth",
"result": {
"status": 1
}
}