Before running this script, make sure that the following conditions are met:
For details about performing the above listed operation, refer to Getting Started with Plesk Expand here.
To create a domain using CLI API, perform the following steps:
1. Compose and run a CLI statement according to the guidelines provided in the example below and in subsection Transforming XML to CLI Input, further in this section.
The sample provides a CLI input you should send to Plesk Expand in order to create a domain myowntest.domain.com for Client 1 on the basis of Domain template 1, with enabled anonymous FTP:
/usr/local/expand/sbin/exp_plesk_domain add_use_template gen_setup [ name=myowntest.domain.com client_id=1 status=0 tmpl_id=1 ] hosting [ vrt_hst ftp_login=ftlog ftp_password=123123 ]
This statement uses the same variables as the XML API sample provided in section Using XML API.
2. The output is provided in XML; it has the same format and provides the same information as the output of a regular XML API statement. See the XML API Sample statement. Creating domain using XML API (Locally) for details.