Request Samples

Setting data for multiple domains under Plesk Administrator

The following packet changes GUIDs of all domains. It is valid only in API RPC 1.5.2.0 and later versions.

<packet version="1.5.2.0">
<domain>
  <set>
    <filter/>
    <values>
       <gen_setup>
          <guid/>
       </gen_setup>
    </values>
  </set>
</domain>
</packet>

 

Multiple domains can be specified within one filter either by id, or by domain_name. The following packet is invalid as it uses both id and domain_name nodes within one filter:

<packet version="1.6.0.0">
<domain>
<set>
   <filter>
      <id>123</id>
      <id>124</id>
      <domain-name>techservice.co.uk</domain-name>
      <domain-name>techknowledge.co.uk</domain-name>
   </filter>
   <values>
      <performance>
          <bandwidth>-1</bandwidth>
      </performance>
   </values>
</set>
</domain>
</packet>

 

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

<packet version="1.4.2.0">
<domain>
<set>
   <filter>
      <id>123</id>
      <id>124</id>
   </filter>
   <values>
      <performance>
          <bandwidth>-1</bandwidth>
      </performance>
   </values>
</set>
<set>
   <filter>
      <domain_name>techservice.co.uk</domain_name>
      <domain_name>techknowledge.co.uk</domain_name>
   </filter>
   <values>
      <performance>
          <bandwidth>-1</bandwidth>
      </performance>
   </values>
</set>
</domain>
</packet>

 

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

<packet version="1.4.2.0">
<domain>
<set>
   <filter/>
   <values>
      <performance>
          <bandwidth>-1</bandwidth>
      </performance>
   </values>
</set>
</domain>
</packet>

 

To set the same settings for all domains of a certain Plesk client, use group filtering (see topic Filtering Issues for details). Plesk clients whose domains are requested can be specified within one filter either by client_id or by client_login.

<packet version="1.6.0.0">
<domain>
<set>
   <filter>
      <owner-login>technolux</owner-login>
      <owner-login>technologic</owner-login>
   </filter>
   <values>
      <performance>
          <bandwidth>-1</bandwidth>
      </performance>
   </values>
</set>
<set>
   <filter>
      <owner-id>1342</owner-id>
      <owner-id>1452</owner-id>
   </filter>
   <values>
      <performance>
          <bandwidth>-1</bandwidth>
      </performance>
   </values>
</set>
</domain>
</packet>

 

You cannot specify clients by login and by ID in one filter. Use different filters (and set operations) instead.

 

Setting data for multiple domains under Plesk client

Plesk clients can manage their own domain accounts only. Thus, they cannot apply group filtering using nodes owner-id and owner-login.

One more exception is: the following packet sets the data for all domains belonging to the calling Plesk client.

<packet version="1.4.2.0">
<domain>
<set>
   <filter/>
   <values>
      <performance>
          <bandwidth>-1</bandwidth>
      </performance>
   </values>
</set>
</domain>
</packet>

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

<packet version="1.4.2.0">
<domain>
<set>
   <filter>
      <id>123</id>
   </filter>
   <values/>
</set>
</domain>
</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 Domain Settings.