Description

This function retrieves the IP address that an account shares with the accounts that it owns.

Examples


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

{  
   "data":{  
      "ip":"192.168.0.1"
   },
   "metadata":{  
      "reason":"OK",
      "command":"get_shared_ip",
      "result":1,
      "version":1
   }
}
<result>
    <data>
        <ip>192.168.0.1</ip>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>get_shared_ip</command>
    </metadata>
</result>

   

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

The WHM user's username.

This parameter defaults to the currently-authenticated user.

A valid WHM username on the server.example

 

Returns

ReturnTypeDescriptionPossible valuesExample
ipstring

The IP address that the WHM user shares.

If the user does not have a shared IP address, the function returns the tilde ( ~ ) character.

A valid IP address.
192.168.0.1