Setting Up Server

Using the set operation, one can

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet changing Plesk server settings or Administrator's information contains the set operation node:

<packet>
  <server>
    <set>
      ...
    </set>
  </server>
</packet>

 

The set node is presented by complex type AdminSetType (server_input.xsd) and structured as follows:

 

Despite all child elements of the set node are optional, the all model group is used, which means that the request packet must contain the set node with at least one child node.

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

 

Response Packet Structure

The set node of the response packet is structured as follows:

 

 

Samples

Changing Administrator's personal information and password

This packet changes Administrator's personal information and password.

<packet version="1.4.2.0">
  <server>
    <set>
      <admin>
        <admin_cname>JohnDoe BV.</admin_cname>
        <admin_pname>John Doe</admin_pname>
        <admin_phone>+49 89333333</admin_phone>
        <admin_fax>+49 893333303</admin_fax>
        <admin_email>john@doe.de</admin_email>
        <admin_address>Theatinerstrasse 96</admin_address>
        <admin_city>Muenchen</admin_city>
        <admin_state>Bavaria</admin_state>
        <admin_pcode>80333</admin_pcode>
        <admin_country>DE</admin_country>
        <send_announce>true</send_announce>
      </admin>
      <password>gogo4ward</password>
    </set>
  </server>
</packet>

Response:

<packet version="1.4.2.0">
<server>
<set>
   <result>
      <status>ok</status>
   </result>
</set>
</server>
</packet>
Configuring server traffic usage statistics

This packet configures server traffic usage statistics so that both inbound and outbound traffic is logged and the log is stored during 3 months; Apache should not restart automatically; session timeout is 30 minutes. Also, this packet enables the protection of site preview mode with password.

<packet version="1.4.2.0">
  <server>
    <set>
      <prefs>
        <stat_ttl>3</stat_ttl>
        <traffic_accounting>3</traffic_accounting>
        <restart_apache_interval>0</restart_apache_interval>
        <preview_protection>true</preview_protection>
      </prefs>
      <session_setup>
         <login_timeout>30</login_timeout>
      </session_setup>
    </set>
  </server>
</packet>

Response:

<packet version="1.4.2.0">
<server>
<set>
   <result>
      <status>ok</status>
   </result>
</set>
</server>
</packet>