Hi,
I had the same wish for a project, and I planned to use the api to do that. I wonder if its a good solution, I mean, it works, but its heavy:
* Check via API the status of the device.
* If assignated, remove the assignment
* soft remove the device (like deleted = True )
* Check the site and add the device (specification is the same because its a site on the same tenant)
* Add the assignement as desired
This would use several API call. The dificult part is "what to do if I get an error in the middle"
Thank you in advance if you have recommendation or piece for advices on this.
François