Filtering is the way the request XML packet indicates the object (one or several customer accounts) to which the operation will be applied. Parameters nested in the filter node are called filtering rule.
The filter node is presented by the ClientSelectionFilterType complex type (client_input.xsd
). Its graphical representation is as follows:
The following packet removes customer accounts which belong to Plesk Administrator:
<packet version="1.6.3.0">
<customer>
<del>
<filter>
<owner-login>admin</owner-login>
</filter>
</del>
</customer>
</packet>
The following packet deletes three customer accounts specified by id:
<packet version="1.6.3.0">
<customer>
<del>
<filter>
<id>124</id>
<id>125</id>
<id>127</id>
</filter>
</del>
</customer>
</packet>
The following packet is identical to the previous one except that it specifies client accounts by name:
<packet version="1.6.3.0">
<customer>
<del>
<filter>
<login>JaneDoe</login>
<login>RRoe</login>
<login>JohnDoe</login>
</filter>
</del>
</customer>
</packet>
The following packet is invalid as both the id and the login nodes are used in the same filter:
<packet version="1.6.3.0">
<customer>
<del>
<filter>
<login>JaneDoe</login>
<id>125</id>
<login>JohnDoe</login>
</filter>
</del>
</customer>
</packet>
To fix this problem, use two different <del> sections:
<packet version="1.6.3.0">
<customer>
<del>
<filter>
<login>JaneDoe</login>
<login>JohnDoe</login>
</filter>
</del>
<del>
<filter>
<id>125</id>
</filter>
</del>
</customer>
</packet>