Add TAGs to specific devices

Solved
guitb
Getting noticed

Add TAGs to specific devices

How can I use the API to add a single tag, specifically 'TEST', to multiple MX devices given their serial numbers? For instance, I have 100 MX devices identified by their serial numbers that need the 'TEST' tag applied. What's the most straightforward method using the API?

1 Accepted Solution
Oren
Meraki Employee
Meraki Employee

getOrganizationDevices with productTypes[]=appliance will get you a list of the MXs in the organization.

Iterating over them, you can use updateDevice to add a tag.

View solution in original post

9 Replies 9
Mloraditch
Kind of a big deal

I may be missing something but I do not see an endpoint the will update MX tags.

If you found this post helpful, please give it Kudos. If my answer solves your problem please click Accept as Solution so others can benefit from it.
guitb
Getting noticed

Would the process involve getting the data for each device individually via a GET, modifying that data to include the new tag, and then updating each device with a PUT?

Mloraditch
Kind of a big deal

I'm saying there are no MX related API calls that include tag data. The update would all be manual on the Dashboard itself.


If an API call existed what you are saying would be a correct way to handle.

If you found this post helpful, please give it Kudos. If my answer solves your problem please click Accept as Solution so others can benefit from it.
Oren
Meraki Employee
Meraki Employee

getOrganizationDevices with productTypes[]=appliance will get you a list of the MXs in the organization.

Iterating over them, you can use updateDevice to add a tag.

Mloraditch
Kind of a big deal

Was looking for something in all the MX options and never even thought of that category 🤦‍

If you found this post helpful, please give it Kudos. If my answer solves your problem please click Accept as Solution so others can benefit from it.
Oren
Meraki Employee
Meraki Employee

Out of curiosity, would you mind asking the AI-powered search in the documentation page how you might achieve this?

I wonder how you’d prompt it, and what would the response to that prompt be.

Mloraditch
Kind of a big deal

Suffice it to say the AI needs some more time in class 🙂

Mloraditch_0-1748637597549.png


When I was trying to help OP this morning, I just used regular search and that didn't help me find it either. Although I was more traditionally searching.

If you found this post helpful, please give it Kudos. If my answer solves your problem please click Accept as Solution so others can benefit from it.
Oren
Meraki Employee
Meraki Employee

Thanks. Do you mind marking the thumb down icon and share the expected result, so the team can look into the thought process there?

(we're not getting replaced just yet 😉)

PhilipDAth
Kind of a big deal
Kind of a big deal

My personal feedback - I have not had any luck with the AI recommending workable or reasonable solutions.

Get notified when there are additional replies to this discussion.