Retrieving IP addresses

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

In this chapter:

Request Packet

Response Packet Structure

Samples

 

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:

 

Response Packet Structure

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

  • 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:

  • 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. 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>
 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.