Child pages
  • WHM API 0 Functions - setsiteip

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

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

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleJSON API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/setsiteip?user=username&ip=192.168.0.20
Expand
titleXML API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/setsiteip?user=username&ip=192.168.0.20
Expand
titleCommand Line
Code Block
languagebash
whmapi0 setsiteip user=username ip=192.168.0.20

Include Page
LIB:_WHMAPI0CLINote
LIB:_WHMAPI0CLINote

Expand
titleOutput (JSON)
Code Block
languagetext
linenumberstrue
{
   "result":[
      {
         "status":1,
         "statusmsg":null
      }
   ]
}
Expand
titleOutput (XML)
Code Block
languagetext
linenumberstrue
<setsiteip>
     <result>
          <status>1</status>
          <statusmsg/>
     </result>
</setsiteip>

 Parameters

Note
titleNote:

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