Stats
Domain Statistics
Return bandwidth statistics for all domains
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.
Warning:
This function requires the Bandwidth Stats feature. To enable this feature, use WHM's Feature Manager interface (WHM >> Home >> Packages >> Feature Manager).
get/Stats/get_bandwidth
Query parameters
timezonestring
Example:America/Chicago
The timezone in which to report the data, in Olson tz format.
Note:
This parameter defaults to the server's timezone.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "get_bandwidth",
"module": "Stats",
"result": {
"data": [
{
"bytes": 74845,
"domain": "example.com",
"month_start": 1561957200,
"protocol": "imap"
}
],
"metadata": {
"transformed": 1
},
"status": 1
}
}