Page tree
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?user=username&enable_account_limit=0
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/setresellerlimits?user=username&enable_account_limit=0
 Command Line
 whmapi0 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 0 documentation or run the whmapi0 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
   "result":[
      {
         "status":1,
         "statusmsg":"Successfully set reseller account creation limits."
      }
   ]
}
 Output (XML)
<setresellerlimits>
     <result>
            <status>1</status>
            <statusmsg>Successfully set reseller account creation limits.</statusmsg>
      </result>
</setresellerlimits>

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 possesses 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 possesses unlimited disk space.
0
enable_package_limitsBoolean

Whether to apply package limits to the reseller.

This parameter defaults to 0.

  • 1 — Enable package limits.
  • 0 — Disable package limits.
0
enable_package_limit_numbersBoolean

Whether to apply package limit numbers to the reseller.

This parameter defaults to 0.

  • 1 — Enable package limit numbers.
  • 0 — Disable package limit numbers.
0

Returns

ReturnTypeDescriptionPossible valuesExample

results

array of hashes

An array of hashes of function output.

This hash includes the status and statusmsg returns.

 

status

Boolean

Whether the function succeeded.

The function returns this value in the results hash.

  • 1 — Success.
  • 0 — Failure.
1

statusmsg

string

A message of success or a reason for failure.

The function returns this value in the  results hash.

  • Successfully set reseller account creation limits.
  • An error message.

Successfully set reseller account creation limits.