cPanel WHM icon

cPanel WHM

Full cPanel WHM API — all 622 operations across Accounts, DNS, Mail, SSL, Backups, Databases and more

Actions262

IP & Network → Return cPanel account bandwidth information

AI-generated

Summary

Retrieve bandwidth usage information for cPanel accounts, optionally filtered by month, year, search criteria, and reseller.

Inputs

  • Month — Numeric month to query (1-12). Defaults to the current month if omitted.
  • Year — Year to query. Defaults to the current year if omitted.
  • Search — A Perl Compatible Regular Expression (PCRE) used to filter accounts based on the specified search type.
  • Searchtype — Specifies which account attribute to apply the search regex to. Options include domain, owner, user, ip, or package.
  • Showres — Specifies a reseller username to filter bandwidth data to their accounts. If omitted, bandwidth info for all users is returned.

Output shape

A list of bandwidth information records per cPanel account matching the query parameters.

The output includes bandwidth data filtered by the optional parameters. If no filters are specified, defaults to current month and year and includes all accounts. Errors in the WHM API response are surfaced as node errors.

Links

Discussion