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:

  • The admin node is optional. It wraps the collection of data describing Administrator's personal information and settings. Data type: adminType (plesk_server.xsd). For information on the node structure and request packet samples, refer to the Administrator Personal Information section.
  • The password node is optional. It specifies new Plesk Administrator's password (5 to 14 characters). Data type: serverPassword (plesk_server.xsd).
  • The prefs node is optional. It wraps the collection of data describing traffic usage statistics settings and Apache restart interval. Data type: serverPrefs (plesk_server.xsd). For information on the node structure and request packet samples, refer to the Server Preferences section.
  • The session_setup node is optional. It holds data describing settings of the user's session in Plesk. Data type: serverSessionSetup (plesk_server.xsd).
  • The login_timeout node is optional. It returns the period (in minutes) during which the user's session can idle before it is automatically closed by the server. Data type: integer. Allowed values: 1 to 99999.
  • The external-id node is optional. It defines the ID of the server in the Plesk components or third-party applications that interact with Plesk. Data type: string.
  • The mode node is optional. It defines the Plesk interface view (either standard or Power User). Data type: string. Available values: standard | poweruser

 

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:

  • The result node is required. It wraps the result of the set operation. Data type: SetResultType (server_output.xsd).
  • The status node is required. It returns the execution status of the set operation defining whether server configuration or administrator's information were successfully updated or not. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. It returns the error code when the set operation fails. Data type: unsignedInt.
  • The errtext node is optional. It returns the error message if the set operation fails. Data type: string.

 

 

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>
 

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.