Programmatically update tags on a device

Q: How do I add tags to a device programmatically?


You can automate this using our Admin API endpoints:

  1. Authenticate.
  2. Get the device’s current configuration version.
  3. Retrieve the device’s current configuration based on the version retrieved in step 2.
  4. Replace the tags with your new desired tags.
  5. .Update the device’s configuration.

Example

Here is an example Python script which implements this workflow:

🚧

Frequently changing the tag set on a resource may impact performance.

See also

👋

If you notice an issue with this page or need help, please reach out to us! Use the 'Did this page help you?' buttons below, or get in contact with our Customer Success team via the Intercom messenger in the bottom-right corner of this page, or at [email protected].