cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
798
Views
9
Helpful
1
Replies

move devices into groups without deviceID

jonvalen
Cisco Employee
Cisco Employee

Hi, I am relatively new but have been able to use the PI restAPI's for specific use cases. I am trying to move a large number of devices that do not have any discernable order to them into specific groups. I am working off of an existing list that only provides the device name and not the deviceID. Is there any way I can make the move in this scenario without the deviceID using restAPI? A simple step or 2 is definitely manageable but this process has to scale to 1000's of devices so a manual device by device intervention is what I am trying to avoid. I am thinking maybe a bulk export of devices that include the device ID and device name, this way you sort and filter to the devices you need or compare to the other list I have. Like I said, I am not too experienced with this and I'm not sure how creative I can be with it. Any suggestions will of use to me. Thank you in advance.

1 Reply 1

Spencer Zier
Cisco Employee
Cisco Employee

I'd recommend using the GET data/Devices resource to map between the names you have and IDs.  Probably best to just pull the entire data set from Devices, and do the matching of IDs and names offline.  You can then use the PUT groups/groupDevices resource to populate the groups.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: