Return all cPanel accounts disk usage

This function lists the disk usage status of the system's user accounts. This also lists information about file system object (inode) usage.

SecurityBasicAuth
Request
query Parameters
cache_mode
string
Default: "on"

Each cPanel & WHM server maintains a cache of users’ disk quota usage. This parameter controls the way this function will use that cache.

  • on - Use the quota cache. This is fast, but it may be inaccurate.
  • off - Ignore the quota cache. This is slower, but it will be more accurate.
Enum: "on" "off"
Example: cache_mode=on
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/get_disk_usage
Request samples
whmapi1 --output=jsonpretty \
  get_disk_usage
Response samples
application/json
{
  • "data": {
    • "accounts": [
      • {
        • "blocks_limit": null,
        • "blocks_used": 2632,
        • "inodes_limit": 9999,
        • "inodes_used": 340,
        • "user": "username"
        }
      ]
    },
  • "metadata": {
    • "command": "get_disk_usage",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}