DisplayNet Logo
Skip to main content

devicetag

The devicetag command assigns tags to devices, walls, multiviews, and presets, removes them again, and lists all tagged objects.

Command TypeDisplayNet
Minimum Version3.6.x

Usage​

devicetag list
devicetag add <type> <item_name> <tag_name>
devicetag remove <type> <item_name> <tag_name>

Subcommands​

SubcommandDescription
listLists all devices and tagged objects, with the tags assigned to each
addAssigns an existing tag to a device or object
removeRemoves a tag from a device or object

Arguments​

ArgumentRequiredDescription
typeadd, removeThe object type. See Object types.
item_nameadd, removeFor devices, the MAC address or hostname; otherwise the configuration or preset name.
tag_nameadd, removeThe name of an existing tag. Manage tags with tag.

Object types​

DeviceTagType in the result reports the same set as a number:

typeDeviceTagTypeTags
device0A physical device
wall1A wall configuration
multiview2A MultiView configuration
snapshot3A snapshot preset
script4A script preset

Examples​

Tag a device, a multiview, and a wall
devicetag add device 341b2280db1e tagnameX
devicetag add multiview multiview_name1 tagnameY
devicetag add wall wallname2 tagnameZ
Remove a tag from a device
devicetag remove device 341b2380db1a tagnameX

Return value​

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
}

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 typeDisplayNet API command
AddressPOST /api/displaynet/<operation>, or name the operation in the body of a POST /api/displaynet. See Sending commands.
RoleUser
SubcommandOperationParameters
adddevicetag_addtag_type device tag
listdevicetag_list—
removedevicetag_removetag_type device tag

See also​

  • tag: create, rename, and delete the tags themselves
  • taggroup: group tags together