Home/Support/Support Forum/Is it possible to add Device Cloud tags via RCI or some other API?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Is it possible to add Device Cloud tags via RCI or some other API?

0 votes
I have an operation that updates our custom python code. Is it possible to set a tag on the device similar to how it is done through the GUI? We'd like to tag the device with our version, such as v1.0.11.
asked Aug 10, 2015 in Device Cloud by billybobbain New to the Community (0 points)

Please log in or register to answer this question.

2 Answers

0 votes
Yes. This is commonly done with the device description field:

<rci_request>
<set_setting>
<system>
<description>New Python Version: x.x.x</description>
</system>
</set_setting>
</rci_request>
answered Aug 11, 2015 by userid0 Veteran of the Digi Community (2,158 points)
0 votes
You can use the /v1/devices/inventory API to set the tags on a device.

For example, an HTTP PUT to /ws/v1/devices/inventory/00000000-00000000-00409DFF-00000000

with payload
Code:
{ "tags" : [ "first tag", "second tag" ] }

will set two tags for that particular device.

If you prefer XML you can use the following (or set the Accept header to application/xml).

HTTP PUT to /ws/v1/devices/inventory/00000000-00000000-00409DFF-00000000.xml with payload
Code:
<device> <tags> <tag>first tag</tag> <tag>second tag</tag> </tags> </device>

Both of the above will replace any existing tags. There is currently no way to simply add a new tag. You can check out some other examples in the programming guide under v1/devices (http://ftp1.digi.com/support/documentation/html/90002008/Current/Default.htm#Reference/R_ws_v1_devices.htm)
answered Sep 9, 2015 by cpopp Seasoned Professional (151 points)
...