UAPI Functions - Quota::get_quota_info

Description

This function retrieves the cPanel user's quota.

Examples


 cPanel or Webmail Session URL

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

 LiveAPI PHP Class

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

 LiveAPI Perl Module

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',
);

 cPanel Template Toolkit

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

 Command Line

uapi --user=username Quota get_quota_info

 

Notes:

  • You must URI-encode values.
  • username represents your account-level username.

 Output (JSON)

{
    "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": {}
}

 

Note:

Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.

 

Parameters

This function does not accept parameters.

Returns

Return

Type

Description

Possible Values

Example

inode_limit

integer

The account's inode quota limit.

 

  • A positive integer.
  • 0 — Unlimited or disabledserver quotas.

0

inodes_remain

integer

The account's available inode quota.

 

  • A positive integer.
  • 0 — Unlimited or disabledserver quotas.

0

inodes_used

integer

The account's number of used inodes.

  • A positive integer.
  • 0 — No usage or disabled server quotas.

1035

megabyte_limit

float

The account's disk space limit, in Megabytes (MB).

  • A decimal number.
  • 0.00 — Unlimited or disabledserver quotas.

 0.00

megabytes_remain

float

The account's available disk space in, Megabytes (MB).

  • A decimal number.
  • 0.00 — Unlimited or disabledserver quotas. 

0.00

megabytes_used

float

The account's used disk space, in Megabytes (MB).

  • A decimal number.
  • 0.00 — No usage or disabled server quotas. 

5.46

under_inode_limit

boolean

Whether the account is under its inode limit.

  • 1 — Under limit.
  • 0 — Over limit.

0

under_quota_overall

boolean

 Whether the account is under both its inode and disk Megabyte (MB) limit. 

  • 1 — Under limit.
  • 0 — Over limit.

1

 under_megabyte_limit 

 boolean 

Whether the account is under its disk space limit, inMegabytes (MB).

  • 1 — Under limit.
  • 0 — Over limit.

 1

  • 16 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....