Child pages
  • WHM API 0 Functions - delip
Skip to end of metadata
Go to start of metadata

 

Description

This function removes an IP address from the server.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/delip?ip=192.168.0.20
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/delip?ip=192.168.0.20
 Command Line
whmapi0 delip ip=192.168.0.20


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 0 documentation or run the whmapi0 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
  "delip": [
    {
      "status": 1,
      "statusmsg": "192.168.0.20 has been removed",
      "warnings": [
         
      ]
    }
  ]
}
 Output (XML)
<delip>
     <delip>
            <status>1</status>
            <statusmsg>192.168.0.20 has been removed</statusmsg>
      </delip>
</delip>

   

Parameters

Parameter Type

Description

Possible valuesExample

ip

string

Required

The IPv4 address.

A valid IPv4 address.192.168.0.20
ethernetdevstring

The network alias to which the IP address is bound.

If you do not use this parameter, the function removes the IP address from cPanel & WHM's data stores, but the IP address remains bound to the Ethernet device.

A valid device name. eth0
skipifshutdownBoolean

Whether to remove the IP address if the Ethernet interface is down.

This parameter defaults to 0.

  • 1 — Do not remove the IP address.
  • 0 — Remove the IP address.
1

Returns

ReturnTypeDescriptionPossible valuesExample
deliparray of hashes

An array of hashes of the function's results.

This hash includes the status and statusmsg returns and warnings array. 

status

Boolean

Whether the function was successful.

The function returns this value in the delip hash.

  • 1 — Success.
  • 0 — Failure.
1

statusmsg

string

A message of success or a reason for failure.

The function returns this value in the delip hash.

 A valid string.null

warnings

array

A list of warning messages as a result of the function call.

The function returns this value in the delip hash.

A list of valid strings.Dave's not here, man.