Most of the XML API call descriptions have one or more XML code samples. The samples are provided at the end of the section describing a call. You may copy an entire example and paste it into your program to quick-test the call. More than one samples may be provided for calls where different invocation scenarios must be considered. Please note that some values used in the samples may not be suitable for your particular situation and must be substituted with the values appropriate to your setup. The following is a typical XML code sample:
Example:
Retrieving Parallels Agent version number.
Input
<packet version="4.0.0" id="2">
<data>
<system>
<get_version/>
</system>
</data>
</packet>
Output
<packet id="2c446af2aet18be" time="2006-05-17T09:54:00+0000" priority="0" version="4.0.0">
<session>vzl.30100.ba7be334-4804-4494-a9c8-15149a0438a5.8c446ae612t2cd6</session>
<target>vzclient4</target>
<dst>
<director>gend</director>
</dst>
<data>
<system>
<version>vzagent-4.0.0</version>
</system>
</data>
<src>
<director>gend</director>
</src>
</packet>
The Input section contains a complete XML response message built according to the schema definition.
The Output section contains the actual response message received from Agent.
Note: Some of the elements and attributes common to all response messages will be omitted from the Output examples for brevity. These attributes and elements may include time, priority
from the <packet>
element, and <session>
, <target>
, <dst>
, <src>
from the message header, and possibly some other elements and attributes that are not essential to a particular example. The <data>
element containing the output data will be included in its entirety, unless noted otherwise in the example itself.