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

 

Description

This function limits the packages that a reseller assigns to cPanel accounts.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/setresellerpackagelimit?user=usernameno_limit=0&package=package1&allowed=1&number=5
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/setresellerpackagelimit?user=username no_limit=0&package=package1&allowed=1&number=5

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.

 Command Line
whmapi0 setresellerpackagelimit user=usernameno_limit=0 package=package1 allowed=1 number=5 

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 package limit."
      }
   ]
}
 Output (XML)
<setresellerpackagelimit>
     <result>
            <status>1</status>
            <statusmsg>Successfully set reseller package limit.</statusmsg>
      </result>
</setresellerpackagelimit>

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The reseller's username.

A valid username on the server.username
no_limitBoolean

Whether to grant the reseller unlimited package use.

This parameter defaults to 0.

  • 1 — Grant the reseller unlimited package use.
  • 0 — Use package limits.
0
packagestring

A hosting plan (package), to modify the reseller's access settings for that package.

Note:

Use this parameter with the number or allowed parameters. 

A valid hosting plan (package) on the server.package1
allowedBoolean

Whether the reseller can access the package hosting plan.

Note:

If you use this parameter, you must also include the package parameter.

  • 1 — Enable access.
  • 0 — Disable access.
1
numberinteger

The maximum number of accounts to which the reseller can assign the package hosting plan.

Notes:

  • If you use this parameter, you must also include the package parameter.
  • If you set a value for this parameter and set the allowed parameter to 0, the reseller cannot use the hosting plan.
A positive integer.5

Returns

ReturnTypeDescriptionPossible valuesExample

result

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 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.

  • Successfully set reseller package limit.
  • An error message.

Successfully set reseller package limit.