x

HOW TO: Declare multiple targets in a Device Cloud /ws/sci Request

?

/ws/sci (Server Command Interface) is a web service that allows users to access information and perform commands which relate to their Device Cloud connected devices. Examples of these requests include:
 
  • Retrieve live or cached information about your device(s)
  • Change settings on your device(s)
  • Interact with a Python program running on your device(s) to send commands or retrieve information
  • Read from and write to the file system on your device(s)
  • Update your Python applications
  • Retrieve data stored locally on your device(s)
  • Update device firmware
  • Update XBee radio firmware on your device(s)
  • Remotely reboot your device(s)

SCI operations can be performed synchronously or asynchronously.
  • Synchronous requests - useful if you would like to execute a short request to the server, and block until the operation is completed.
  • Asynchronous requests - useful when you want to execute a request that has the possibility of taking a while to complete, or you simply want to send the request off and return immediately.
With Each element specified with <targets> can be thought of as an OR statement, thus you can specify multiple group paths, and it will effect each path specified.  Here are the current <targets> options available:
  • <device id="{device_id}"/>
When included in an SCI request, this element specifies a particular device ID. Requests issued will only be sent to the specified device.
 
  • <device id="all"/>
When included in an SCI request, this element specifies the device IDs of all of your Device Cloud-registered devices. Requests issued will be sent to all of the devices registered within your Device Cloud user account.
 
  • <device tag="{tag name}"/>
When included in an SCI request, this element specifies a particular tag name. Requests issued will be sent to all of the devices containing the specified tag name.
 
  • <group path="{group name}"/>
When included in an SCI request, this element specifies a particular group name. Requests issued will be sent to each of the devices contained within the specified group.

Note: Each element under Targets can be thought of as an OR statement, thus you can specify multiple group paths, and it will effect each path specified.


Device Cloud Programmer Guide.

It is beyond the scope of this article to describe the rich feature-set of Device Cloud and its API.  Please refer to the documentation at the link above for further information.
Last updated: Aug 23, 2018

Filed Under

Digi Remote Manager

Recently Viewed Articles

No recently viewed articles