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

 

Description

This function lists a reseller's available IP addresses.

Examples 


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

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)
{
  "ip": [
    "192.168.0.20",
    "192.168.0.21",
    "192.168.0.22",
    "192.168.0.23"
  ],
  "all": 1,
  "result": [
    {
      "statusmsg": "OK",
      "status": 1
    }
  ]
}
 Output (XML)
<getresellerips>
    <all>1</all>
    <ip>192.168.0.20</ip>
    <ip>192.168.0.21</ip>
    <ip>192.168.0.22</ip>
    <ip>192.168.0.23</ip>
    <result>
        <status>1</status>
        <statusmsg>OK</statusmsg>
    </result>
</getresellerips>

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

A reseller's username, to query only that reseller.

If you do not specify a value, the function lists available IP addresses for the root user.

A valid WHM username on the server.

username

Returns

ReturnTypeDescriptionPossible valuesExample
iparrayThe reseller's available IP addresses.An array of available IP addresses.10.0.0.1
allBooleanWhether all of the reseller's IP addresses are available.
  • 1 — All of the reseller's IP addresses are available.
  • 0 — Some or all IP addresses are unavailable.
1

result

array of hashes

An array of hashes of function information.

This hash includes the status and statusmsg parameters.username

status

Boolean

Whether the function succeeded.

The function returns this parameter in the result hash.

  • 1 — Success.
  • 0 — Failure.

 

1

statusmsg

string

A message of success or a reason for failure.

The function returns this parameter in the result hash.

  • Ok
  • An error message.
Ok