Packet Structure

A packet can be represented graphically in the following way:

Plesk API RPC Packet Structure

  1. HTTP header - a transport part. In addition to other standard information, it must contain information about the server where the operation will be performed, and the authorization data. You can use either of the authorization ways:
  2. The XML declaration: <?xml version="1.0" encoding="UTF-8" ?>
  3. The packet header specifying the version of XML API.
  4. The packet body defining the operations that the Plesk server should perform.

Hereinafter, we refer to the packet header and body together as packet.

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. Refer to the next section for a packet sample.

Note: There can be many operation sections within one operator. Also, starting from XML API v. 1.4.0.0, a single packet allows specifying multiple operator elements.

You can look for particular values of labels [operator], [operation], and [parameter] in two places: