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:
Note: For details on GUIDs, refer to the GUIDs Overview section.
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>