Child pages
  • WHM API 0 Functions - editquota

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

This function modifies a user's disk quota.

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleJSON API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/editquota?user=user&quota=500
Expand
titleXML API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/editquota?user=user&quota=500
Expand
titleCommand Line
Code Block
languagebash
whmapi0 domainuserdata domain=example.com

Include Page
LIB:_WHMAPI0CLINote
LIB:_WHMAPI0CLINote

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