tag_device
Add or remove tags on CPE devices to group them for preset matching and bulk operations.
Instructions
Add or remove a tag on a CPE device in GenieACS. Tags are labels used to group devices for preset matching, bulk operations, and organizational purposes. Use action="add" to tag a device and action="remove" to untag it. Tags are referenced in preset preconditions (e.g. {"_tags":"office"}) to target specific device groups for automatic configuration. The device must exist in GenieACS — returns a 404 error if the device ID is invalid. Example: tag_device(device_id="00236A-SmartRG585-SMRT00236a42", tag="office", action="add"). Use search_devices with a _tags filter to verify tag assignment after modification. Limitations: tag names are case-sensitive strings. There is no built-in tag listing — use search_devices or genieacs://devices/list to discover existing tags on devices.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | The operation to perform: "add" to tag the device, "remove" to untag it. | |
| device_id | Yes | The exact GenieACS device identifier (_id field). Typically in the format OUI-ProductClass-SerialNumber (e.g. "00236A-SmartRG585-SMRT00236a42"). Obtain valid IDs from the genieacs://devices/list resource. | |
| tag | Yes | The tag string to add or remove (e.g. "office", "floor-2", "firmware-pending"). |