Description

This function modifies a user's disk quota.

Examples 


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

{  
   "output":"Using Universal Quota Support (quota=512000)\n",
   "result":[  
      {  
         "statusmsg":"Set quota for user.",
         "status":1
      }
   ]
}
<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