Setting Subscription Parameters

The subscription settings are as follows:

A collection of subscription settings can be applied to one or several subscriptions at a time. Plesk Administrator can update settings for several customers at a time.

Subscription settings are specified by sending a request set packet to Plesk server.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet that sets a collection of subscription settings should include the set operation node:

<packet>
<webspace>
   <set>
    <filter>
     <values>
        <mail>
          ...
        </mail>
        <hosting>
          ...
        </hosting>
        ...
     </values>
    </filter>
   </set>
</webspace>
</packet>

The set node does not have a separate type, it is nested within the complex type (webspace.xsd). The set node has the following graphics representation:

Webspace_xsd_set

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

Setting data for multiple subscriptions under Administrator

The following packet changes GUIDs of all subscriptions.

<packet>
<webspace>
  <set>
    <filter/>
    <values>
       <gen_setup>
          <guid/>
       </gen_setup>
    </values>
  </set>
</webspace>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <webspace>
    <set>
      <result>
        <status>ok</status>
        <filter-id>1</filter-id>
        <id>1</id>
      </result>
      <result>
        <status>ok</status>
        <filter-id>4</filter-id>
        <id>4</id>
      </result>
    </set>
  </webspace>
</packet>

To specify some domains by id and others by domain_name, use different set nodes:

<packet>
<webspace>
<set>
   <filter>
      <id>123</id>
      <id>124</id>
   </filter>
   <values>
      <performance>
          <bandwidth>-1</bandwidth>
      </performance>
   </values>
</set>
<set>
   <filter>
      <name>techservice.co.uk</name>
      <name>techknowledge.co.uk</name>
   </filter>
   <values>
      <performance>
          <bandwidth>-1</bandwidth>
      </performance>
   </values>
</set>
</webspace>
</packet>

 

To set the same settings for all domains registered in Plesk, the following packet can be used:

<packet>
<webspace>
<set>
   <filter/>
   <values>
      <performance>
          <bandwidth>-1</bandwidth>
      </performance>
   </values>
</set>
</webspace>
</packet>

 

Multiple subscriptions can be specified within one filter. The following packet is invalid as it uses both id and name nodes within one filter:

<packet>
<webspace>
<set>
   <filter>
      <id>123</id>
      <id>124</id>
      <name>techservice.co.uk</name>
      <name>techknowledge.co.uk</name>
   </filter>
   <values>
      <performance>
          <bandwidth>-1</bandwidth>
      </performance>
   </values>
</set>
</webspace>
</packet>  
Setting data for multiple domains under customer

Customers can manage their own subscriptions only. Thus, they cannot apply group filtering using nodes owner-id and owner-login. However, they are able to specify the blank filter node matching all customer's subscriptions.

<packet>
<webspace>
<set>
   <filter/>
   <values>
      <performance>
          <bandwidth>-1</bandwidth>
      </performance>
   </values>
</set>
</webspace>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <webspace>
    <set>
      <result>
        <status>ok</status>
        <filter-id>1</filter-id>
        <id>1</id>
      </result>
      <result>
        <status>ok</status>
        <filter-id>4</filter-id>
        <id>4</id>
      </result>
    </set>
  </webspace>
</packet>

Since the set packet means the update of subscription settings in Plesk database, the values node cannot be left empty. The following packet will cause the error:

<packet>
<webspace>
<set>
   <filter>
      <id>123</id>
   </filter>
   <values/>
</set>
</webspace>
</packet>

The values node can specify some or all kinds of settings. To see the sample packet for a certain setting, proceed to the relevant sub-topic of Subscription Settings.