Description

This function lists a reseller's available IP addresses.

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/getresellerips?api.version=1&user=username
https://hostname.example.com:2087/cpsess##########/xml-api/getresellerips?api.version=1&user=username
whmapi1 getresellerips user=username

{  
   "data":{  
      "ip":[
         "192.168.0.20",
         "192.168.0.21",
         "192.168.0.22",
         "192.168.0.23",
      ],
      "all":1
   },
   "metadata":{  
      "version":1,
      "reason":"OK",
      "result":1,
      "command":"getresellerips"
   }
}
<result>
    <data>
        <ip>192.168.0.20</ip>
        <ip>192.168.0.21</ip>
        <ip>192.168.0.22</ip>
        <ip>192.168.0.23</ip>
        <all>1</all>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>getresellerips</command>
    </metadata>
</result>

   

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