Available Filters

Filtering is the way a request XML packet indicates to which objects to apply an operation. Parameters nested in the filter node are called filtering rule.

The filter node is presented by the domainFilterType complex type (domain_input.xsd). Its graphical representation is as follows:

  • The id node is optional. It specifies the subscription ID. Data type: integer.
  • The owner-id node is optional. It specifies the customer ID. Data type: integer.
  • The name node is optional. It specifies the subscription name. For hosting subscriptions, you should provide a site name. Data type: string.
  • The owner-login node is optional. It specifies the login name of Plesk user who owns a subscription. Data type: string.
  • The guid node is optional. It specifies the GUID of a subscription. Data type: string.

    Note: For details on GUIDs, refer to the GUIDs Overview section.

  • The owner-guid node is optional. It specifies the GUID of a subscription owner. Data type: string.
  • The external-id node is optional. It specifies a GUID of a subscription in the Plesk component (for example, Customer and Business Manager). Data type: string.
  • The owner-external-id node is optional. It specifies a GUID of a subscription owner account in the Plesk component (for example, Customer and Business Manager). Data type: string. 
Examples

The following packet requests hosting settings of subscriptions specified by their id:

<packet>
<webspace>
<get>
   <filter>
      <id>124</id>
      <id>127</id>
   </filter>
   <dataset>
      <hosting/>
   </dataset>
</get>
</webspace>
</packet>

 

The following packet is identical except it specifies subscriptions by their names:

<packet>
<webspace>
<get>
   <filter>
      <name>example.com</name>
      <name>sample.com</name>
   </filter>
   <dataset>
      <hosting/>
   </dataset>
</get>
</webspace>
</packet>

The following packet is invalid as both the id node and the name node are used in the same filter:

<packet>
<webspace>
<get>
   <filter>
      <name>example.com</name>
      <id>126</id>
   </filter>
   <dataset>
      <hosting/>
   </dataset>
</get>
</webspace>
</packet>

To fix this issue, use two different <get> sections:

<packet>
<webspace>
<get>
   <filter>
      <name>example.com</name>
   </filter>
   <dataset>
      <hosting/>
   </dataset>
</get>
<get>
   <filter>
      <id>126</id>
   </filter>
   <dataset>
      <hosting/>
   </dataset>
</get>
</webspace>
</packet>

 

Group filtering

The following packet removes all subscriptions owned by two Plesk users:

<packet>
<webspace>
<del>
   <filter>
      <owner-id>1324</owner-id>
      <owner-id>1325</owner-id>
   </filter>
</del>
</webspace>
</packet>

The same packet removes subscriptions of JDoe and RRoe Plesk users:

<packet>
<webspace>
<del>
   <filter>
      <owner-login>JDoe</owner-login>
      <owner-loginn>RRoe</owner-login>
   </filter>
</del>
</webspace>
</packet>

The following packet sent by Plesk Administrator removes all subscriptions available in Plesk. If sent by a customer/reseller, it will remove all subscriptions of this customer/reseller:

<packet>
<webspace>
<del>
   <filter/>
</del>
</webspace>
</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.