Return cPanel account bandwidth information

This function retrieves account bandwidth information.

SecurityBasicAuth
Request
query Parameters
month
integer [ 1 .. 12 ]

The month to query, in numeric format.

This value defaults to the current month.

Example: month=12
search
string

A Perl Compatible Regular Expression (PCRE) that filters the results. The system matches the PCRE against the searchtype parameter's specified type.

If you do not specify a value for both the searchtype and search parameters, the function does not use the search criteria.

Example: search=ownername
searchtype
string

The account information to query.

  • domain — Match domains against the search regular expression.
  • owner — Match the WHM user who owns the account against the search regular expression.
  • user — Match usernames against the search regular expression.
  • ip — Match IP addresses against the search regular expression.
  • package — Match hosting plans (packages) against the search regular expression.

If you do not specify a value for both the searchtype and search parameters, the function does not use the searchtype value.

Enum: "domain" "owner" "user" "ip" "package"
Example: searchtype=owner
showres
string

The reseller to query.

If you do not specify a value, the function queries all users.

Example: showres=reseller_user
year
integer

The year to query.

This value defaults to the current year.

Example: year=2019
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/showbw
Request samples
whmapi1 --output=jsonpretty \
  showbw
Response samples
application/json
{
  • "data": {
    • "acct": [
      • {
        • "bwusage": [
          • {
            • "deleted": 0,
            • "domain": "example.com",
            • "usage": 0
            }
          ],
        • "deleted": 0,
        • "limit": 0,
        • "maindomain": "example.com",
        • "owner": "root",
        • "reseller": 0,
        • "totalbytes": 352,
        • "user": "user"
        }
      ],
    • "month": 12,
    • "reseller": "root",
    • "totalused": 352,
    • "year": 2019
    },
  • "metadata": {
    • "command": "showbw",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}