Claim multiple devices in single POST request

leegoss
Comes here often

Claim multiple devices in single POST request

Hi Guys,

 

I'm new to scripting / APIs and am struggling to find some additional information on the 'Claim a device into a network' POST.

 

All i'm wanting to know is it possible to claim multiple devices in a single POST request and if so, what is the correct format.

 

ie. something like

{"serial":"Q234-ABCD-5678”, "serial":”Q345-ABCD-1234”, "serial":”Q456-ABCD-6789”}

Or a delimited string of serials.

{"serial":"Q234-ABCD-5678 Q345-ABCD-1234 Q456-ABCD-6789”}

3 Replies 3
PhilipDAth
Kind of a big deal
Kind of a big deal

You can create an action batch and batch together the API calls.

https://developer.cisco.com/meraki/api/#/rest/guides/action-batches/

Seshu
Meraki Employee
Meraki Employee

@leegoss Action batch would be the simplest way. 

 

I also tried a UI like dashboard where you enter Serial or Order#, one per line and it can claim in one go. Navigate to the Org -> Inventory -> Claim

 

https://drive.google.com/open?id=19Pr_7b4UP0A0zpcXCjn23S-6AbbTQa1B

TonyC
Meraki Employee
Meraki Employee

We just pushed a change that allows an array of orders / serials / licenses via the claim endpoint directly! Docs will get updated but if you want to try it out now, here are the supported parameters (notice they are now plural, and formatted as an array):

https://dashboard.meraki.com/api_docs#claim-a-list-of-devices-licenses-and/or-orders-into-an-organiz...

#wishgranted 😉
Get notified when there are additional replies to this discussion.