cPanel/Quota
cPanel module

Quota

2 functions, invoked through the cpanel_uapi tool.

scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="Quota", 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_local_quota_info GET#

Return local disk quota information

This function retrieves the cPanel account's quota for the server where you run the function. For example, a distributed cPanel account could approach its quota. The servers will balance that cPanel user's quota between the parent and the child node.

Note:

This function runs on only the local server. To retrieve the cPanel account's total quota, use the UAPI Quota::get_quota function instead.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

byte_limitinteger
The limit for disk space the cPanel account may use on this server, in bytes. A positive integer. 0 - Unlimited or disabled server quotas. Note: This value does not update immediately.
bytes_usedinteger
The amount of disk space the cPanel account uses on this server, in bytes. A positive integer. 0 - No usage or disabled server quotas.
inode_limitinteger
The limit for inodes that the cPanel account may use on this server. A positive integer. 0 - Unlimited or disabled server quotas.
inodes_usedinteger
The number of inodes that the cPanel account uses on this server. A positive integer. 0 - No usage or disabled server quotas.

get_quota_info GET#

Return disk quota information

This function retrieves the cPanel account's quota.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

inode_limitany
The account's inode quota limit. * 0 — Unlimited or disabled server quotas.
inodes_remainany
The account's available inode quota. * 0 — Unlimited or disabled server quotas.
inodes_usedany
The account's number of used inodes. * 0 — No usage or disabled server quotas.
megabyte_limitany
The account's disk space limit, in megabytes (MB). * 0.00 — Unlimited or disabled server quotas.
megabytes_remainany
The account's available disk space in, megabytes (MB). * 0.00 — Unlimited or disabled server quotas.
megabytes_usedany
The account's used disk space, in megabytes (MB). * 0.00 — No usage or disabled server quotas.
under_inode_limitinteger
Whether the account is under its inode limit. 1 — Under limit. 0 — Over limit.
One of: 1 0
under_megabyte_limitinteger
Whether the account is under its disk space limit, in megabytes (MB). 1 — Under limit. 0 — Over limit.
One of: 1 0
under_quota_overallinteger
Whether the account is under both its inode and disk megabyte (MB) limit. 1 — Under limit. 0 — Over limit.
One of: 1 0