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).

SecurityBasicAuth
Request
query Parameters
timezone
string

The timezone in which to report the data, in Olson tz format.

Note:

This parameter defaults to the server's timezone.

Example: timezone=America/Chicago
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/Stats/get_bandwidth
Request samples
uapi --output=jsonpretty \
  --user=username \
  Stats \
  get_bandwidth
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "get_bandwidth",
  • "module": "Stats",
  • "result": {
    • "data": [
      • {
        • "bytes": 74845,
        • "domain": "example.com",
        • "month_start": 1561957200,
        • "protocol": "imap"
        }
      ],
    • "errors": null,
    • "messages": null,
    • "metadata": {
      • "transformed": 1
      },
    • "status": 1,
    • "warnings": null
    }
}