Osama Tariq

Well-Known Member
Nov 27, 2014
206
2
18
Lahore, Pakistan
cPanel Access Level
Root Administrator
Twitter
Getting error while run command:

Code:
[email protected] [~]# uapi --user=username Bandwidth query grouping=domain.com interval=daily protocols=http%7Cimap%7Csmtp timezone=America%2FChicago
---
apiversion: 3
func: query
module: Bandwidth
result:
  data: ~
  errors:
    - "Invalid “grouping”: “domain.com”! at /usr/local/cpanel/Cpanel/BandwidthDB/Read.pm line 239, <STDIN> line 1.\n"
  messages: ~
  metadata: {}

  status: 0
 

Osama Tariq

Well-Known Member
Nov 27, 2014
206
2
18
Lahore, Pakistan
cPanel Access Level
Root Administrator
Twitter
Now it shows nothing in no result:

Code:
# uapi --user=ghckteum Bandwidth query grouping=domain interval=daily protocols=http%7Cimap%7Csmtp timezone=America%2FChicago---
apiversion: 3
func: query
module: Bandwidth
result:
  data: {}

  errors: ~
  messages: ~
  metadata: {}

  status: 1
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
Hello,

You may find a command like this is more useful and easier to formulate for what you need:

Code:
uapi --user=$username Bandwidth query grouping=domain interval=daily
This shows the total bandwidth usage for the account instead of choosing specific protocols.

Thank you.