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

  • The filter node is required. It indicates subscriptions to be updated with the specified information. Data type: DomainFilterType (domain_input.xsd). To see the structure of this node, proceed to topic Available Filters.
  • The values node is required. It contains a collection of settings that will be set for the filtered subscriptions. Data type: none.
  • The gen_setup node is optional. It specifies a collection of general subscription settings that will be set for the filtered subscriptions. Data type: SetGenSetupType (plesk_domain.xsd). To see the structure of this node, proceed to topic General Account Information.
  • The limits node is optional. It specifies the limits on use of Plesk resources for the filtered subscriptions. Data type: domainLimits (plesk_domain.xsd). To see the structure of this node, proceed to the Limits topic.
  • The prefs node is optional. It specifies a collection of preferences for the filtered subscriptions. Data type: domainPrefs (plesk_domain.xsd). To see the structure of this node, proceed to topic Subscription Preferences.
  • The hosting node is optional. It specifies hosting settings for the filtered subscriptions. Data type: domainHostingAgentSet (plesk_domain.xsd). To see the structure of this node, proceed to topic Hosting Settings.
  • The disk_usage node is optional. It specifies the amount of disk space allotted for email boxes and mailing lists on the filtered subscriptions. Data type: none. To see the structure of this node, proceed to topic Disk Space Usage Settings.
  • The performance node is optional. It specifies a collection of performance settings for the filtered subscriptions. Data type: DomainPerformanceType (plesk_domain.xsd). To see the structure of this node, proceed to topic Performance Settings.
  • The permissions node is optional. If specified in the request packet, it returns a list of services and privileges provided with the subscription. Data type: domainPerms (plesk_domain.xsd). See the section Permissions for details.
  • The php-settings node is optional. It specifies custom PHP settings that will act as a preset for all domains within the subscription. Data type: phpSettings (plesk_domain.xsd). See the section PHP Settings for details.
  • The mail node is optional. It specifies settings of a mail service of your subscription. Data type: WebspaceMailPreferences (webspace.xsd)- the extension of MailPreferences (plesk_mailname.xsd). See Mail Service Preferences for details.

    mail_WebspaceMailPreferences1

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 optional. It wraps the result of the requested set operation. It can be missing if some error occurs before the validation starts. Data type: resultFilterType (common.xsd).
  • The status node is required. It returns the execution status of the set operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. It is used to return the error code if the set operation fails. Data type: unsignedInt.
  • The errtext node is optional. Can be used to return an error message if the set operation fails. Data type: string.
  • The filter-id node is optional. If supported, it is always present and used to return the parameter by which the subscription was filtered by in the request packet. Data type: anySimple.
  • The id node is optional. It is missing if the request packet fails before the validation on the server side. If present, this node identifies the subscription whose settings are updated. Data type: integer.

 

 

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.

 

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.