Add device to a Collector Group
Hi Guys
Is it possible to add a device to a Collector Group directly?
I've been testing code to find a set of collectors that match a name and add to one of the specific collectors retrieved. Currently it grabs all with LON in the name and matches the device name. I'm then randomly picking one of them and adding the device). However, my understanding is its then tied to this collector and not the grrup?
PLease correct me if I'm wrong here.
So, can I add directly to a group with JSON as below
$newdeviceobj= @{
'name' = "$device" - name of the device
'displayName' = "$device" - name of the device
'preferredCollectorId' = "0"
"autoBalancedCollectorGroupId" = $id - (this is the ID of the collector group)
'description' = "$device" - name of the device
}
I'm using a POST to device/devices and i receive
@{data=; errmsg=Collector(id=0) does not exist; status=1404}
I've got 'preferredCollectorId' = "0" as clearly i dont want to define it at this point.
Thanks