Synchronous Requests

Synchronous request using a device ID

POST the following to: /ws/sci

<!-- common to every sci request -->
<sci_request version="1.0">
    <!-- indicates we want to send an rci request -->
   <send_message>
      <!-- preparing us for the list of who to operate on -->
      <targets>
         <!-- we will send it to this device -->
         <device id="00000000-00000000-00000000-00000000" />
      </targets>
      <!-- the payload for the send_message command, an rci request -->
      <rci_request version="1.1">
         <query_state>
            <device_stats />
         </query_state>
      </rci_request>
   </send_message>
</sci_request>

which returns when the operation has completed (or timed out) and the body of the response will be:

<sci_reply version="1.0">
<!-- start of the sci response --> 
<send_message>
  <!-- the "operation" of our sci_request -->
   <device id="00000000-00000000-00000000-00000000">
      <!-- contains the response for this device -->
      <rci_reply version="1.1">
          <!-- the rci response for the particular device -->
         <query_state>
            <device_stats>
               <cpu>36</cpu>
               <uptime>152</uptime>
               <datetime>Thu Jan 1 00:02:32 1970 (based on uptime)</datetime>
               <totalmem>8388608</totalmem>
               <usedmem>5811772</usedmem>
               <freemem>2576836</freemem>
            </device_stats>
         </query_state>
      </rci_reply>
   </device>
</send_message>

Synchronous request using a group path

POST the following to /ws/sci

<!-- common to every sci request -->
    <sci_request version="1.0">
       <!-- indicates we want to send an rci request -->
       <send_message>
          <!-- preparing us for the list of who to operate on -->
          <targets>
             <!-- we will send it to this group -->
             <group path="group1" />
          </targets>
          <!-- the payload for the send_message command, an rci request -->
          <rci_request version="1.1">
             <query_state>
                <device_stats />
             </query_state>
          </rci_request>
       </send_message>
    </sci_request>

which will return when the operation has completed (or timed out) and the body of the response will be:

Note The return will contain a response for each device included within the specified group.

   <sci_reply version="1.0">
    <!-- start of the sci response -->
    <send_message>
      <!-- the "operation" of our sci_request -->
       <device id="00000000-00000000-00000000-00000001">
          <!-- contains the response for the first device in the specified group -->
          <rci_reply version="1.1">
            <!-- the rci response for the first device in the specified group -->
             <query_state>
                <device_stats>
                   <cpu>22</cpu>
                   <uptime>237565</uptime>
                   <totalmem>8388608</totalmem>
                   <usedmem>7136532</usedmem>
                   <freemem>1252076</freemem>
                </device_stats>
             </query_state>
          </rci_reply>
       </device>
       <device id="00000000-00000000-00000000-00000002">
          <!-- contains the response for the second device in the specified group -->
          <rci_reply version="1.1">
            <!-- the rci response for the second device in the specified group -->
             <query_state>
                <device_stats>
                   <cpu>42</cpu>
                   <uptime>438054</uptime>
                   <datetime>Mon Jun 28 19:36:29 2010</datetime>
                   <totalmem>8388608</totalmem>
                   <usedmem>8165060</usedmem>
                   <freemem>223548</freemem>
                </device_stats>
             </query_state>
          </rci_reply>
       </device>
    </send_message>
    <sci_request>

Synchronous request using a device tag:

POST the following to: /ws/sci

<!-- common to every sci request -->
<sci_request version="1.0">
 <!-- indicates we want to send an rci request -->
<send_message>
   <!-- preparing us for the list of who to operate on -->
   <targets>
      <!-- we will send it all devices that have this tag -->
      <device tag="tag1" />
   </targets>
   <!-- the payload for the send_message command, an rci request -->
   <rci_request version="1.1">
      <query_state>
         <device_stats />
      </query_state>
   </rci_request>
</send_message>
</sci_request>

which will return when the operation has completed (or timed out) containing responses from all of the devices matching the specified tag.