Plesk Expand Remote XML API is used when you need to perform certain operations from a remote host.
In Remote XML API, the XML packet is wrapped in the PHP or Perl script which contains all the required information: administrator's access details, the name of the corresponding Plesk Expand Operator and other relevant data.
A reader of this section must be familiar with PHP and Perl programming languages. For more information on these technologies, refer to the www.php.net and www.perl.com websites.
In order to perform a certain action via Remote XML API, the following steps are required:
1. Compose a script in Perl or PHP for connecting to the remote Plesk Expand host over HTTPS and transferring the necessary data. The URL for connecting to this host through the webgate will have the following format: https://your.domain.com:8442/webgate.php
The script must contain the following information:
Note: For a full list of available operators, refer to Plesk Expand Operators section.
The full list of necessary commands and parameters with detailed comments are provided in the descriptions of Perl and PHP samples.
2. Insert a standard XML API packet containing the parameters of the query into the body of the script. For guidelines on creating XML API statements, see Composing XML Commands.
3. Save the statement in a separate
.php file; the filename format is arbitrary. Execute the file.
4. The results are provided in the form of the XML packet.
See a sample statement for operation "Create a domain" using Perl or PHP scripts further in this section.