Use the get operation to retrieve all IP addresses from Plesk server database.

Request Packet

A request XML packet retrieving IP addresses from Plesk database includes the get operation node.

<packet>
<ip>
  <get/>
</ip>
</packet>

The get node graphical representation is as follows:

image 35407

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.

Response Packet Structure

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

image 35409

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 get operation. Data type: string. Allowed values: ok | error.

  • The errcode node is optional. Is returns the error code if the get operation fails. Data type: integer.

  • The errtext node is optional. It returns the error message if the get operation fails. Data type: string.

  • The addresses node is optional. If the get operation succeeds, it returns the following data:

    image 35415

  • The ip_info node is required. It wraps the IP address info.

    • The ip_address node is required. Specifies the IP address in Plesk database. Data type: ip_address (common.xsd).
    • The netmask node is required. It specifies the netmask of the network. Data type: ip_address (common.xsd).
    • The type node is required. It specifies the type of IP address. Data type: string. Allowed values: shared | exclusive.
    • The interface node is required. It specifies the server network interface name. Data type: string.
    • The default node is optional and available only in Plesk 17.5 and earlier . It specifies if the IP address is default for a site. It specifies if any site is shown when you type the IP address in browser. Data type: none.
    • The public_ip_address node is optional. For Plesk servers behind NAT you can match private IP addresses to corresponding public ones. This node specifies the public IP address corresponding to the retrieved IP address. Data type: ip_address (common.xsd).

Samples

The packet retrieving IP addresses from Plesk database looks as follows:

<packet>
<ip>
  <get/>
</ip>
</packet>

Response:

<packet>
<ip>
<get>
      <result>
         <status>ok</status>
         <addresses>
            <ip_info>
               <ip_address>10.58.49.221</ip_address>
               <netmask>255.255.0.0</netmask>
               <type>exclusive</type>
               <interface>eth0</interface>
            </ip_info>
         </addresses>
      </result>
</get>
</ip>
</packet>