At the step of forming request API RPC packet, client application gets the command from GUI or a software module to perform a certain operation (or several ones) on one or more Plesk objects. The application should convert the requested command into the format of an XML packet compliant with Plesk XML API. To implement the command-to-XML-packet converter, keep in mind the following.
The XML packet consists of the header and the body. The header is formed as follows:
<packet version="1.4.0.0">
…
</packet>
The VERSION attribute specifies the selected version of the API RPC protocol. We recommend using the latest version supported by Plesk deployed on the server side. For details, refer to the Plesk API RPC Protocol chapter.
The packet body with the XML-formatted command is put within these header tags. The packet body is structured as follows:
<[operator]>
<[operation]>
<[parameter1]>…</[parameter1]>
<[parameter2]>…</[parameter2]>
…
</[operation]>
</[operator]>
This example shows the common structure of the packet body, with one [operator] element and one [operation] element within. In a particular implementation, labels [operator], [operation], [parameter] should be substituted by real operators, operations, and parameters.
Note: There can be many operation sections within one operator. Also, starting from API RPC v. 1.4.0.0, a single packet allows multiple operator elements.
You can look for particular values of labels [operator], [operation], and [parameter] in two places: