Description

This function retrieves the cPanel user's quota.

Examples


https://hostname.example.com:2083/cpsess##########/execute/Quota/get_quota_info

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Retrieve the cPanel user's quota.
$quota_info = $cpanel->uapi(
    'Quota', 'get_quota_info'
);

 

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Retrieve the cPanel user's quota.
my $quota_info = $cpliveapi->uapi(
    'Quota', 'get_quota_info',
);

 

<!-- Retrieve the cPanel user's quota. -->
[% execute( 'Quota', 'get_quota_info' ); %]

 

uapi --user=username Quota get_quota_info

{
	"messages": null,
	"errors": null,
	"status": 1,
	"data": {
		"under_quota_overall": "1",
		"megabytes_remain": "0.00",
		"inodes_remain": "0",
		"megabyte_limit": "0.00",
		"inode_limit": "0",
		"inodes_used": 1035,
		"megabytes_used": "5.46",
		"under_inode_limit": "1",
		"under_megabyte_limit": "1"
	},
	"metadata": {}
}

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible ValuesExample
inode_limit integer

The account's inode quota limit.


  • A positive integer.
  • 0 — Unlimited or disabled server quotas.

0
inodes_remain integer

The account's available inode quota.


  • A positive integer.
  • 0 — Unlimited or disabled server quotas.

0
inodes_used integerThe account's number of used inodes.
  • A positive integer.
  • 0 — No usage or disabled server quotas.

1035
megabyte_limit
floatThe account's disk space limit, in Megabytes (MB).
  • A decimal number.
  • 0.00 Unlimited or disabled server quotas.

  0.00
megabytes_remain floatThe account's available disk space in, Megabytes (MB).
  • A decimal number.
  • 0.00 Unlimited or disabled server quotas.

0.00
megabytes_used floatThe account's used disk space, in Megabytes (MB).
  • A decimal number.
  • 0.00 — No usage or disabled server quotas.

5.46
under_inode_limit BooleanWhether the account is under its inode limit.
  • 1 — Under limit.
  • 0 — Overlimit.
0
under_quota_overall BooleanWhether the account is under both its inode and disk Megabyte (MB) limit.
  • 1 — Under limit.
  • 0 — Overlimit.
1
under_megabyte_limit BooleanWhether the account is under its disk space limit, in Megabytes (MB).
  • 1 — Under limit.
  • 0 — Overlimit.

 1