Possible Invalid JSON Returned

Operating System & Version
CloudLinux 7.9
cPanel & WHM Version
v92.0.11

jam230

Registered
Mar 5, 2021
4
0
1
Canada
cPanel Access Level
Root Administrator
I just started recently using UAPI to get JSON responses but they don't seem to make sense to me and it's probably something simple that I'm not aware of.

I have used many JSON APIs but I can figure out why there are missing curly braces and missing quotes in the output. It doesn't match what is supposed to be output according to the docs either: UAPI Functions - Bandwidth::query - Developer Documentation - cPanel Documentation

I can't decode or do anything with it in the PHP scripts I am using.

Here is the full command and output I am using directly from the terminal.

Bash:
[root@server ~]# uapi --user=user Bandwidth query grouping=domain%7Cyear interval=daily protocols=http%7Cimap%7Csmtp

---

apiversion: 3
func: query
module: Bandwidth
result:
  data:
    example.com:
      "1577854800": 676280342
      "1609477200": 114910972
  errors: ~
  messages: ~
  metadata: {}
 
Last edited by a moderator: