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

 

Description

This function adds IP addresses to a reseller's account.

Note:

If you want to assign a main IP address to a reseller's account, use the WHM API 0 setresellermainip function.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/setresellerips?user=username&ips=192.168.0.20
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/setresellerips?user=username&ips=192.168.0.20
 Command Line
whmapi0 setresellerips user=username ips=192.168.0.20 

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 configured IP addresses delegation to reseller."
      }
   ]
}
 Output (XML)
<setresellerips>
     <result>
            <status>1</status>
            <statusmsg>
            Successfully configured IP addresses delegation to reseller.
            </statusmsg>
      </result>
</setresellerips>

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The reseller's username.

A valid username on the server.username
ipsstring

The IP addresses to allocate to the reseller's account.

If you do not use this parameter, the function clears the reseller's IP address list.

A comma-separated list of IP addresses.192.168.0.20
delegateBoolean

Whether to require the reseller to choose a dedicated IP address.

This parameter defaults to 0.

  • 1 — Require a dedicated IP address.
  • 0 — Do not require a dedicated IP address.
1

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 configured IP addresses delegation to reseller.
  • An error message.

Successfully configured IP addresses delegation to reseller.