Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function modifies a user's disk quota.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/editquota?user=user&quota=500
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/editquota?user=user&quota=500
 Command Line
whmapi0 domainuserdata domain=example.com

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 0 documentation or run the whmapi0 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{  
   "output":"Using Universal Quota Support (quota=512000)\n",
   "result":[  
      {  
         "statusmsg":"Set quota for user.",
         "status":1
      }
   ]
}
 Output (XML)
<editquota>
    <output>Using Universal Quota Support (quota=512000)</output>
    <result>
        <status>1</status>
        <statusmsg>Set quota for user.</statusmsg>
    </result>
</editquota>

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The cPanel account username.

A valid cPanel username on the server.user
quotastring

Required

The account's new quota.

  • A positive integer that represents the maximum amount of disk space, in Megabytes (MB).
  • 0 or unlimited grants the account unlimited disk space.
500

Returns

ReturnTypeDescriptionPossible valuesExample
resultarray of hashesAn array of hashes of function status information.Each hash includes the status and statusmsg returns. 

status

Boolean

Whether the function succeeded.

The function returns this value in the result hash.

  • 1 — Success.
  • 0 — Failure.
1

statusmsg

string

A message of success or a reason for failure.

The function returns this value in the result hash.

  • Set quota for user.
  • An error message.
Set quota for user.
outputstringA message about the function.
  • A message of success.
  • An error message.
Using Universal Quota Support (quota=512000)\n