.pdf)
WHM Plugins
addip function is only available for API version 0. For API version 1, use the addips function.
addip function from within your custom script:
/xml-api/addip function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/xml-api/addip
addip function from within your custom script:
/json-api/addip function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/json-api/addip
addip function takes the following required variables as input:
addip function takes the following optional variable as input:
0 to call this version of the function.
addip function. 1 — true.
0 — false.
https://example.com:2087/xml-api/addip?ip=208.77.188.166&netmask=255.255.255.0 in WebHost Manager will produce output similar to the following:
<addip>
<addip>
<msgs>eth0:2 is now up. 208.77.188.166/255.255.255.0 broadcast 208.77.188.166
has been added System has 1 free ip.</msgs>
<status>1</status>
<statusmsg>Success</statusmsg>
</addip>
</addip>
https://example.com:2087/json-api/addip?ip=208.77.188.166&netmask=255.255.255.0 in WebHost Manager will produce output similar to:
{
"addip":[
{
"errors":[
],
"status":1,
"statusmsg":"Success",
"msgs":"eth0:4 is now up. 208.77.188.166/255.255.255.0 broadcast 208.77.188.255
has been added\nSystem has 4 free ips."
}
]
}