API PUT to rename a collector device displayname errors randomly
Hi all - hopefully one of the gurus on here can help me out (i have searched and couldn't find an answer)
I'm using PowerShell to install the Collector on some of our Domain Controllers- following this for the cmdline
After install, the device displayname is 127.0.0.1:ID (numeric value of the ID), which is the same device as the collector.
Because of this, I'm trying to rename the device using a REST PUT to the device/devices/ID path. This IS working, but I have to wait a seemingly random amount of time to get a 200 status success code returned. I can confirm the device displayname is updated correctly at this point. Otherwsie, after the install, I am constantly getting a 1403 returned from my GET and subsequent PUT invoke-restmethod.
It's within a fairly sizable window (maybe around 30 mins?) that it seems to work with a 200 returned. I'm not making any other API calls with this token in that time and hitting limits.
I'm editing the Displayname of the device in code (just reading the device ID and using GET of the entire device config into a PSobject, changing its displayname, and writing it back out to JSON and using an Invoke-RestMethod to write back.
Any help much appreciated!