Description

This function changes a site's or user's IP address.

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/setsiteip?user=username&ip=192.168.0.20
https://hostname.example.com:2087/cpsess##########/xml-api/setsiteip?user=username&ip=192.168.0.20
whmapi0 setsiteip user=username ip=192.168.0.20

{
   "result":[
      {
         "status":1,
         "statusmsg":null
      }
   ]
}
<setsiteip>
     <result>
          <status>1</status>
          <statusmsg/>
     </result>
</setsiteip>

 Parameters

You must enter the user or domain parameter.


Parameter Type

Description

Possible valuesExample

ip

string

Required

The IPv4 address.

A valid IPv4 address.192.168.0.20
userstringThe user's username.A valid username.username
domainstringThe domain name.A valid domain name.example.com

Returns

ReturnTypeDescriptionPossible valuesExample
setsiteiphash

A hash of the function's results.

This hash includes the result hash. 

result

array of hashes

An array of hashes of the function's results.

This function returns this value in the setsiteip hash.

This hash includes the status and statusmsg returns. 

status

Boolean

Whether the function succeeded.

This function returns this value in the result hash.

  • 1 — Success.
  • 0 — Failure.
1

statusmsg

string

A message of success or a reason for failure.

This function returns this value in the result hash.

 A valid string.null