6 years ago
Bulk add devices to device Group
We have up to 500 devices that need to be added to a LM device group via the API - is it possible to do this in bulk, with a single API call, or do we need to make an API call per device to set the...
Assuming the devices are already in LM, I don't believe so. I'm pretty sure static groups are only assigned by in the Device API and not in the Device Group. But it should be pretty easy to throw a FOR loop around the API call and run 500 API calls pretty quickly. You may need to put a few small pauses in there because I think the API Rate cap is something like 400 calls/minute (the API will let you know).
You might want to also look at Dynamic Groups, they let you auto assign devices automatically based on a AppliesTo filter. This would be just one API call (or one GUI change really) at the Device Group level. But this is really meant for grouping devices based on some common factor they share. I wouldn't suggest attempting to just create a huge AppliesTo full of hard coded names.
If the devices are not in LM at all yet, then you can look at NetScan to add them. For example the CSV import will let you add devices and provide a hostgroup where the device should be added. Doesn't help for removing them from the group later though.