This function retrieves resource usage and custom statistics for a cPanel user account.
uapi --output=jsonpretty \ --user=username \ ResourceUsage \ get_usages
{- "apiversion": 3,
- "func": "get_usages",
- "module": "ResourceUsage",
- "result": {
- "data": [
- {
- "description": "MySQL® Databases",
- "error": null,
- "formatter": "format_bytes",
- "id": "mysql_databases",
- "maximum": 15,
- "url": "sql/index.html",
- "usage": 0
}
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}