AutomoxAutomox

Add API PATCH method to Device Tags

cole
October 13, 2021 at 3:40 pm UTC

Right now, we can edit device tags, but in order to keep from overwriting current valuable device tags, we need run a GET command, save all device tag content into an array, and then execute a PUT command to write an entirely new batch of tags.
It would be way easier if we could just run a PATCH command as an additive operation add more new tags.
This is a particular pain point when we have scripts creating from-scratch tags for devices that end up overwriting valuable manually-created tags that some of our technicians have added for their own records.

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (2)

David_MitchellOctober 14, 2021
#1

Patch would be nice, but its not to hard to pull the existing tags from a device and then add them to the list of tags you want to set. See this post, the end has a nice example. Read past the first part to see the code for additive.
 

 

coleOctober 14, 2021
#2

Thanks @David_Mitchell . I should clarify the reason we want this feature so badly is because we’re making api calls from our linux clients via bash. (Keeping things in bash makes a lot of our other linux endpoint work easier). If I were using powershell, python, or a more modern language, the need wouldn’t be so high.