Skip to main content

Issue calling Bandwidth::query UAPI from WHM?

Comments

2 comments

  • lhoezee
    Hello, I just tried this out and it worked for me. I'm using WHM 62 (Build 15). Make sure $start and $end are in unix timestamp format. I got it to work with the following: [PHP] $response = $cpanel->execute_action(3, 'Bandwidth', 'query', $domainModel->getUsername(), [ 'grouping' => 'domain', 'interval' => 'daily', 'protocols' => 'http', 'timezone' => 'UTC', 'start' => strtotime('-10 days'), 'end' => time() ]); [/PHP] Notice I just went back 10 days. If I used time() for both start and end I get no data. Also, as a side comment / question. As I was reading your question I had the impression you wanted all domains on the server for your report? I wanted to confirm this only shows bandwidth for the domain (and add-on domains) for the provided cPanel username.
    0
  • cPanelMichael
    Hello @Saeven, cPanel version 54 is at EOL status: cPanel & WHM Version 54 Now EOL, Cent 5 & Cent 6-32bit in 3 Months | cPanel Newsroom In addition to the previous post, you may also want to upgrade cPanel to a supported version. Thank you.
    0

Please sign in to leave a comment.