devicetag
The devicetag command assigns tags to devices, walls, multiviews, and presets, removes them again, and lists all tagged objects.
| Command Type | DisplayNet |
| Minimum Version | 3.6.x |
Usage
devicetag list
devicetag add <type> <item_name> <tag_name>
devicetag remove <type> <item_name> <tag_name>
Subcommands
| Subcommand | Description |
|---|---|
list | Lists all devices and tagged objects, with the tags assigned to each |
add | Assigns an existing tag to a device or object |
remove | Removes a tag from a device or object |
Arguments
| Argument | Required | Description |
|---|---|---|
type | add, remove | The object type. See Object types. |
item_name | add, remove | For devices, the MAC address or hostname; otherwise the configuration or preset name. |
tag_name | add, remove | The name of an existing tag. Manage tags with tag. |
Object types
DeviceTagType in the result reports the same set as a number:
type | DeviceTagType | Tags |
|---|---|---|
device | 0 | A physical device |
wall | 1 | A wall configuration |
multiview | 2 | A MultiView configuration |
snapshot | 3 | A snapshot preset |
script | 4 | A script preset |
Examples
Tag a device, a multiview, and a walldevicetag add device 341b2280db1e tagnameX
devicetag add multiview multiview_name1 tagnameY
devicetag add wall wallname2 tagnameZ
Remove a tag from a devicedevicetag remove device 341b2380db1a tagnameX
Return value
- devicetag list
- Other subcommands
devicetag list{
"status": "SUCCESS",
"request_id": null,
"result": {
"devicetags": [
{
"DeviceTagItemId": 13,
"DeviceTagType": 0,
"DeviceId": "343b23811df0",
"tags": [
"device_tag_name_1",
"device_tag_name_2"
]
},
{
"DeviceTagItemId": 16,
"DeviceTagType": 1,
"DeviceId": "24",
"tags": [
"wall_tag_name_1"
]
},
{
"DeviceTagItemId": 20,
"DeviceTagType": 2,
"DeviceId": "93",
"tags": [
"multiview_tag_name_1"
]
}
]
},
"error": null
}
devicetag remove device 6cdeeb343882 device_tag_name_3{
"status": "SUCCESS",
"request_id": null,
"result": null,
"error": null
}
Notifications
Assignment changes broadcast a DN_NOTIFICATION with the object's updated tag list:
devicetag add device 341b22811df9 device_tag_name_3{
"status": "DN_NOTIFICATION",
"request_id": null,
"result": {
"devicetag_update": [
{
"DeviceTagItemId": 36,
"DeviceTagType": 0,
"DeviceId": "341b22811df9",
"tags": [
"device_tag_name_1",
"device_tag_name_2",
"device_tag_name_3"
]
}
]
},
"error": null
}
REST API
| Endpoint type | DisplayNet API command |
|---|---|
| Address | POST /api/displaynet/<operation>, or name the operation in the body of a POST /api/displaynet. See Sending commands. |
| Role | User |
| Subcommand | Operation | Parameters |
|---|---|---|
add | devicetag_add | tag_type device tag |
list | devicetag_list | — |
remove | devicetag_remove | tag_type device tag |