Use the del operation to remove the IP address from Plesk database. You cannot remove the IP of the computer (defined by network configuration), where Plesk server is located. You also cannot remove the IP address if one or more sites are hosted on this IP or forwarded from this IP.

Note: You cannot remove an IP address from IP pool of a reseller who shares this IP with Plesk customers.

Note: (Plesk for Windows) You cannot add IP addresses to or remove them from a network interface with enabled DHCP. To add or remove an IP address, disable DHCP for a given network interface.

Request Packet Structure

A request XML packet removing the IP address from Plesk database includes the del operation node:

<packet>
<ip>
  <del>
  ...
  </del>
</ip>
</packet>

The del node graphical representation is as follows:

image 35442

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • The filter node is required. Specifies the filtering rule. Data type: ipFilterType (ip_input.xsd).
  • The ip_address node is required. Specifies the IP address in Plesk database. Data type: ip_address (common.xsd).

Remarks

You can remove multiple IP addresses in a single packet. Add as many ip_address operations as the number of IP addresses you want to remove.

<filter>
   <ip_address>...</ip_address>
   ...
   <ip_address>...</ip_address>
</filter>

Response Packet Structure

The del node of the output XML packet is structured as follows:

image 35445

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

  • The result node is required. It wraps the response retrieved from the server. Data type: resultType (common.xsd).
  • The status node is required. It specifies the execution status of the del operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is returns the error code if the del operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the del operation fails. Data type: string.
  • The id_address node is optional. It returns the removed IP address. Data type: ip_address (common.xsd).

Samples

Removing a single IP address

This packet removers 192.0.2.1 IP address from Plesk database.

<packet>
<ip>
   <del>
      <filter>
         <ip_address>192.0.2.1</ip_address>
      </filter>
   </del>
</ip>
</packet>

Response:

<packet>
<ip>
   <set>
      <result>
         <status>ok</status>
         <ip_address>192.0.2.1</ip_address>
      </result>
   </set>
</ip>
</packet>

Removing multiple IP addresses

This packet removes 192.0.2.10 and 192.0.2.12 IP addresses.

<packet>
<ip>
   <del>
      <filter>
         <ip_address>192.0.2.10</ip_address>
         <ip_address>192.0.2.12</ip_address>
      </filter>
   </del>
</ip>
</packet>

Response (if the first IP address was removed and the second IP address was not found):

<packet>
<ip>
   <set>
      <result>
         <status>ok</status>
         <ip_address>192.0.2.10</ip_address>
      </result>
      <result>
         <status>error</status>
         <errcode>1013</errcode>
         <errcode>ip does not exist.</errcode>
         <ip_address>192.0.2.12</ip_address>
      </result>
   </set>
</ip>
</packet>