Child pages
  • WHM API 1 Functions - setresellerlimits
Skip to end of metadata
Go to start of metadata

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&bandwidth_limit=1073741824&diskspace_limit=1073741824&enable_resource_limits=1&enable_overselling=1&enable_overselling_bandwidth=1&enable_overselling_diskspace=1&enable_account_limit=0
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/setresellerlimits?api.version=1&user=username&bandwidth_limit=1073741824&diskspace_limit=1073741824&enable_resource_limits=1&enable_overselling=1&enable_overselling_bandwidth=1&enable_overselling_diskspace=1&enable_account_limit=0
 Command Line
whmapi1 setresellerlimits user=username bandwidth_limit=1073741824 diskspace_limit=1073741824 enable_resource_limits=1 enable_overselling=1 enable_overselling_bandwidth=1 enable_overselling_diskspace=1 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. 

 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.
0
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_overselling, 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.
1073741824
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.
1
enable_overselling_bandwidthBoolean

Whether the reseller can oversell bandwidth.

Important:

The system only enforces this limit if you set the enable_resource_limits and the enable_overselling values to 1.

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

Whether the reseller can oversell disk space.

Important:

The system only enforces this limit if you set the enable_resource_limits and the enable_oversellng values to 1.

  • 1 — The reseller can oversell disk space.
  • 0 — The reseller cannot oversell disk space.
1
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.
1073741824
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.