HOW TO: Digi Remote Manager: Query Settings From a Device Using /ws/sci

First: the way to interact with the device’s settings and state information is through RCI (Remote Command Interface). That is a device-level interface that is accessible via the Remote Manager SCI (Server Command Interface)–/ws/sci. To interact with devices via SCI, most actions will be a HTTP POST web service request.

All of these examples are available in the Remote Manager API Explorer found under the Documentation section of the UI. 


 

Query All Settings

  1. Go to API Explorer and select Examples > SCI > RCI > Query device settings (as shown above)

  2. That creates an HTTP POST request example to the /ws/sci interface with the following XML as the content of the POST:

/ws/sci POST for RCI Query Setting Request

<sci_request version="1.0">
  <send_message cache="false">
    <targets>
      <device id="00000000-00000000-00000000-00000000"/>
    </targets>
    <rci_request version="1.1">
      <query_setting/>
    </rci_request>
  </send_message>
</sci_request>

Replace the device ID with the actual device you’re interested in querying. You can also replace that single device reference with a tag name or group name. There’s more information in the programming guide on how to change the targets of an SCI request.  Also note the cache="false" attribute. This tells SCI that you want to force the request to go all the way to the device and not pull data from the cached settings in Device Cloud. 

  1. Click the “Send” button
  2. Look for the web service response to show a result code of 200:

  1. Click on that line and you’ll see everything returned from that request.  


 

Query a Specific Settings Group

To limit the request to a specific settings group, simply specify that group in the <query_setting/> tag. The following example will illustrate limiting the settings to just the <system> group.

  1. You will perform an HTTP POST to SCI as above; but this time, change the request content to include the system tag:

    <sci_request version="1.0">
      <send_message cache="false">
        <targets>
          <device id="00000000-00000000-00409DFF-FF000000"/>
        </targets>
        <rci_request version="1.1">
          <query_setting>
            <system/>
          </query_setting>
        </rci_request>
      </send_message>
    </sci_request>

    (Note the addition of a <system> tag between the opening and closing <query_setting> tags)
     

  2. The response now contains only the <system> settings group

 

Last updated: Apr 18, 2024

Filed Under

Digi Remote Manager

Recently Viewed

No recently viewed articles

Did you find this article helpful?