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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

 

Description

This function sets a reseller's bandwidth and disk quotas.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/setresellerlimits?api.version=1&user=username&enable_account_limit=0
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/setresellerlimits?api.version=1&user=username&enable_account_limit=0
 Command Line
whmapi1 setresellerlimits user=username enable_account_limit=0

Notes:

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

 Output (JSON)
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "setresellerlimits"
  }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>setresellerlimits</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The reseller's username.

A valid username on the server.username
enable_account_limitBoolean

Whether to limit the reseller's total number of accounts.

Note:

Use this parameter with the account_limit parameter. 

This parameter defaults to 0.

  • 1 — Limit.
  • 0 — Do not limit.
1
account_limitinteger

The reseller's maximum total number of accounts.

Important:

The system only enforces this maximum if you set the enable_account_limit value to 1.

A positive integer that represents the maximum number of accounts that the reseller may access.

10

enable_resource_limits

Boolean

Whether to limit the reseller's resources.

Note:

Use this parameter with the bandwidthlimit, diskspace_limit, enable_overselling, enable_overselling_bandwidth, enable_overselling_diskspace, enable_package_limits, and enable_package_limit_numbers parameters. 

This parameter defaults to 0.

  • 1 — Limit resources.
  • 0 — Do not limit resources.
1
bandwidth_limitinteger

The reseller's total bandwidth limit.

Important:

The system only enforces this limit if you set the enable_resource_limits value to 1.

  • A positive integer that represents the reseller's bandwidth limit, in Megabytes (MB).
  • 0 — The reseller has unlimited bandwidth.
0
enable_oversellingBoolean

Whether the reseller can oversell accounts.

Important:

The system only enforces this limit if you set the enable_resource_limits value to 1.

  • 1 — The reseller can oversell accounts.
  • 0 — The reseller cannot oversell accounts.
0
enable_overselling_bandwidthBoolean

Whether the reseller can oversell bandwidth.

Important:

The system only enforces this limit if you set the enable_resource_limits value to 1.

  • 1 — The reseller can oversell bandwidth.
  • 0 — The reseller cannot oversell bandwidth.
0
enable_overselling_diskspaceBoolean

Whether the reseller can oversell disk space.

Important:

The system only enforces this limit if you set the enable_resource_limits value to 1.

  • 1 — The reseller can oversell disk space.
  • 0 — The reseller cannot oversell disk space.
0
diskspace_limitinteger

The reseller's total disk space usage limit.

Important:

The system only enforces this limit if you set the enable_resource_limits value to 1.

  • A positive integer that represents the reseller's disk space limit, in Megabytes (MB).
  • 0 — The reseller has unlimited disk space.
0
enable_package_limitsBoolean

Whether to apply package limits to the reseller.

  • 1 — Enable package limits.
  • 0 — Disable package limits.
0
enable_package_limit_numbersBooleanWhether to apply package limit numbers to the reseller.
  • 1 — Enable package limit numbers.
  • 0 — Disable package limit numbers.
0


Returns

This function only returns metadata.

  • No labels