Child pages
  • WHM API 1 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?api.version=1&user=user&quota=500
Expand
titleXML API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/editquota?api.version=1&user=user&quota=500
Expand
titleCommand Line
Code Block
languagebash
whmapi1 editquota user=user quota=500

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote

Expand
titleOutput (JSON)
Code Block
languagetext
linenumberstrue
{  
   "metadata":{  
      "version":1,
      "reason":"Set quota for user.",
      "output":{  
         "raw":"Using Universal Quota Support (quota=512000)\n"
      },
      "result":1,
      "command":"editquota"
   }
}
Expand
titleOutput (XML)
Code Block
languagetext
linenumberstrue
<result>
    <metadata>
        <version>1</version>
        <reason>Set quota for user.</reason>
        <output>
            <raw>Using Universal Quota Support (quota=512000)</raw>
        </output>
        <result>1</result>
        <command>editquota</command>
    </metadata>
</result>

Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

   

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

This function only returns metadata.