Bandwidth and Disk Quotas
Return cPanel account bandwidth information
This function retrieves account bandwidth information.
get/showbw
Query parameters
monthinteger
Example:12
The month to query, in numeric format.
This value defaults to the current month.
searchstring
Example:ownername
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.
searchtype'domain' | 'owner' | 'user' | 'ip' | 'package'
Example:owner
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.
showresstring
Example:reseller_user
The reseller to query.
If you do not specify a value, the function queries all users.
yearinteger
Example:2019
The year to query.
This value defaults to the current year.
Response
HTTP Request was successful.
Example response
{
"data": {
"acct": [
{
"bwusage": [
{
"domain": "example.com"
}
],
"maindomain": "example.com",
"owner": "root",
"totalbytes": 352,
"user": "user"
}
],
"month": 12,
"reseller": "root",
"totalused": 352,
"year": 2019
},
"metadata": {
"command": "showbw",
"reason": "OK",
"result": 1,
"version": 1
}
}