Below are some more advanced examples of using CLI for operators:
This packet is valid for exp_plesk_domain operator:
<packet version="0.1.1.0">
<refresh>
<filter>
<server_id>3</server_id>
</filter>
<dataset>
<gen_info/>
<stat/>
<prefs/>
<limits/>
<hosting/>
<user/>
</dataset>
</refresh>
</packet>
This packet tells Plesk Expand to reload data (general information, statistics, preferences, limits, physical hosting and user information) of Plesk server with ID=3.
CLI variant:
$ exp_plesk_domain refresh filter [ server_id=3 ] dataset gen_info- \
stat- prefs- limits- hosting- user-
To reload the same set of data on several Plesk servers, provide these servers IDs in square brackets:
$ exp_plesk_domain refresh filter [ server_id=1 server_id=2 server_id=3 ] dataset gen_info- \
stat- prefs- limits- hosting- user-
For terminal nodes, which have neither text data values nor other child nodes, it's good to use a '-' sign at the end of their names. This construction is also valid (though lengthier):
$ exp_plesk_domain refresh filter [ server_id=1 server_id=2 server_id=3 ] dataset \
gen_info [ ] stat [ ] prefs [ ] limits [ ] hosting [ ] \
user [ ]
One more example:
<packet version="0.1.1.0">
<add>
<gen_setup>
<name>Basic</name>
<htype>vrt_hst</htype>
</gen_setup>
<hosting>
<vrt_hst>
<fp>false</fp>
<fp_ssl>false</fp_ssl>
<fp_auth>false</fp_auth>
<use_shell>true</use_shell>
</vrt_hst>
</hosting>
</add>
</packet>
This packet tells Plesk Expand to create a domain template Basic, with hosting type physical hosting, with permission shell access enabled and other specified permissions disabled. Direct this packet to the standard input of operator exp_plesk_tmpl_domain.
CLI variant of this packet:
$ exp_plesk_tmpl_domain add gen_setup [ name='First of all' \
htype=vrt_hst ] hosting vrt_hst [ fp=false fp_ssl=false \
fp_auth=false use_shell=true ]
If this seems bogus for reading, try to put more brackets, e.g. in the following way:
$ exp_plesk_tmpl_domain add [ \
gen_setup [ name='First of all' htype=vrt_hst ] \
hosting [ vrt_hst [ fp=false fp_ssl=false fp_auth=false \
use_shell=true ] ] ]