cPanel/ResourceUsage
cPanel module

ResourceUsage

1 functions, invoked through the cpanel_uapi tool.

scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="ResourceUsage", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.

get_usages GET#

Return resource usage and custom statistics

This function retrieves resource usage and custom statistics for a cPanel user account.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:

descriptionstring
The resource's UI display name.
errorstring
An error message, if applicable.
formatterany
The resource's defined output format. format_bytes format_bytes_per_second percent null — No defined output format. Note: Third-party modules will return their defined formatter value.
idstring
The resource's reference name. disk_usage filesusage - This function only returns this value if the Display File Usage information in the cPanel stats bar setting is enabled in the Display section of WHM's Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings). cachedmysqldiskusage cachedpostgresdiskusage - This function only returns this value if PostgreSQL® databases are enabled. bandwidth addon_domains subdomains aliases email_accounts mailing_lists - This function only returns this value if the Mailman service is enabled in WHM's Service Manager interface (WHM >> Home >> Service Configuration >> Service Manager). autoresponders forwarders email_filters ftp_accounts - This function only returns this value if FTP accounts exist on the server. mysql_databases - This function only returns this value if MySQL® databases are enabled. postgresql_databases Note: Certain id values may not appear, based on the server's current profile.
maximuminteger
The resources's maximum usage value. Note: This function returns an null value for an (unlimited) quota.
urlstring
The resource's defined URL link to its corresponding interface, in applicable.
usageinteger
The resource's current usage value.