You may include more than one API call in a single request message. The calls may belong to the same interface/operator or they may belong to different operators. For example, you may start a performance monitor and at the same time subscribe for an event notification. Or retrieve a list of disks from the Hardware Node and at the same time retrieve a list of devices from it. There are a few simple rules that you should follow when making multiple calls in the same message. If all calls belong to the same operator, simply specify the operator name in the target
element in the message header and list the calls one after another in the message body. If the calls belong to different operators, include a separate target
element containing the name of the operator for each call, and include the API calls in the message body. The calls are processed on the server side independently from each other. If one of the calls fails, the other calls will still be processed. The response messages are sent back for each call individually, one separate response for each request.
Example
The following request message contains two calls: one retrieves the information about the devices from the Hardware Node, and the other retrieves the information about the disks and partitions.
Input
<packet version="4.0.0" id="2">
<target>vzadevm</target>
<target>computerm</target>
<data>
<vzadevm>
<get_info/>
</vzadevm>
<computerm>
<get_disk/>
</computerm>
</data>
</packet>
Each call generates an individual response.
Output 1
<packet xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/computerm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="bc46e53091t3d6crd40" time="2007-09-09T02:39:02+0000" priority="0" version="4.0.0">
<origin>computerm</origin>
<target>vzclient69-4fce28dd-0cd3-1345-bb94-3192b940fb90</target>
<dst>
<director>gend</director>
</dst>
<data>
<computerm>
<disk>
<partition>
<name>/dev/sda2</name>
<mount_point>/</mount_point>
<block_size>4096</block_size>
<fs_type>ext3</fs_type>
<option>rw</option>
<blocks xsi:type="ns2:resourceType">
<total>1239079</total>
<used>344363</used>
<free>830758</free>
</blocks>
<inodes xsi:type="ns2:resourceType">
<total>1280000</total>
<used>45322</used>
<free>1234678</free>
</inodes>
</partition>
<!-- The rest of the output is omitted for brevity -->
</disk>
</computerm>
</data>
<src>
<director>gend</director>
</src>
</packet>
Output 2
<packet xmlns:ns1="http://www.swsoft.com/webservices/vza/4.0.0/vzadevm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="bc46e53091t3d6crd40" time="2007-09-09T02:39:03+0000" priority="0" version="4.0.0">
<origin>vzadevm</origin>
<target>vzclient69-4fce28dd-0cd3-1345-bb94-3192b940fb90</target>
<dst>
<director>gend</director>
</dst>
<data>
<vzadevm>
<device_info>
<partition>/dev/sda1</partition>
<partition>/dev/sda2</partition>
<partition>/dev/sda3</partition>
<partition>/dev/sda5</partition>
<partition>/dev/dm-0</partition>
<filesystem>auto</filesystem>
</device_info>
</vzadevm>
</data>
<src>
<director>gend</director>
</src>
</packet>