API Call to Reboot AP

Cybergeek
Here to help

API Call to Reboot AP

This functionality is needed for a multitude of reasons. I first suggested this via "Make a Wish" on the Meraki Dashboard interface almost a year ago. I reached out to my sales representative last February and requested this functionality though the proper channel. I have been trying to understand why others have not spoken up about lacking this feature.

 

I have also posted this request to the GitHub for the Meraki provisioning library. (https://github.com/meraki/provisioning-lib/issues/3)

 

Reasons this functionality is needed:

 

Delegated Administration - Since Meraki doesn't have any delegated functionality at the item level their is no way to give a user access to reboot AP's in a network besides making them a "full blown" administrator.

Reboot Scheduling - Ability to schedule the reboot of an AP at a certain time.

Bulk Reboot - Ability to enumerate AP's from list and reboot them with one click.

6 Replies 6
colo
Meraki Alumni (Retired)
Meraki Alumni (Retired)

Hi Cybergeek,

 

Meraki / Support generally advise not to reboot APs. If there is an issue that requires a reboot, it’s possibly a bug. Please call or email Meraki support.

 

How can you reboot Meraki APs?

You can disable the port (or turn off PoE) on the upstream Meraki switches, which is providing power to the Meraki AP.

HTTP REQUEST

PUT /devices/[serial]/switchPorts/[number]

PARAMETERS

  • enabled The status of the switch port
  • poeEnabled The PoE status of the switch port

 

What if you don't have Meraki switches?

However I had to solve this exact problem for a customer without Meraki Switchesand managed to reboot thousands of APs using an API script to remove and add the AP from the network. This forces the AP to reboot and connect to the Meraki Cloud to get it's config.

Slow Method - I have tested and used this with customers.
Step 1. Remove AP from Network

POST /networks/[networkId]/devices/[serial]/remove
Step 2. Wait some amount of time and the AP will download a default config. 

Step 3. Add AP back to the Network

POST /networks/[networkId]/devices/claim
Step 4. Confirm the AP is now online with the original config. The GET request should be successful.

GET /networks/[networkId]/devices/[serial]

 

Colin Lowenberg
Take the Meraki Challenge
solutions.meraki.com/challenge
Cybergeek
Here to help

Colin,

 

In the default settings when you do this operation it add a tag to all of the AP's ( recently-added ). Do you have any way of dealing with this side effect? Though this is a possible workaround, I think actually having a specific call to reboot the AP is warranted ( much cleaner way of preforming the action). 

 

One other thing that would be nice (nothing to do with the API) is the fact when you reboot an AP it doesn't log an event for this action. I know you can have it send you a notification (gateway goes offline for 5 minutes or more). In most cases on a reboot the AP will be back online in less time than the threshold.

 

-Andy

PhilipDAth
Kind of a big deal
Kind of a big deal

Scheduled AP reboots - if you use Meraki switching you can attached a schedule to a switch port.  We use this to power down our VoIP phones and access points at night time when no body is here.

MacuserJim
A model citizen

It would be nice to have the option to reboot devices through the API, I can see why it's not there, but the world should revolve around me. 😉  I am working on a project to transition 1500 networks from separated networks to combined networks and moved to another template (this is split up over the course of a few days). I have a python script to do heavy lifting for me. However during this course it is pretty common for the MS to lose connection with the Meraki cloud within a few minutes after being transitioned, it still passes traffic as it's clients are still online. Since I am running this at night, by morning most of the MS appliances are online, however there are still a few that we need to reboot by calling someone locally and have the power cycle it. I think if I could have the script tell the MS to reboot immediately after the transition it wouldn't have that downtime or require the manual intervention.

NolanHerring
Kind of a big deal

I had a super fancy python API script to pull inventory for the ORG and then if there was an MS device, build a new inventory, and then if any ports had description of WIRELESS to shut those ports, wait a minute, no shut etc. Worked OK-ish but every now and then we would run into issue, API rate limiting (even though we didn't rush it at all), or a port simply wouldn't be re-enabled. So it wasn't very solid. Ports would get stuck in disabled mode and the AP would be off for hours.

Always wished there was an API call to use the 'cycle port' option but that has yet to happen.

However I JUST discovered there is a new API call to 'reboot device' which should hopefully making this much smoother for me, so I'm working on that now.

POST /networks/{networkId}/devices/{serial}/reboot

I'll let you guys know how it ends.
Nolan Herring | nolanwifi.com
TwitterLinkedIn
NolanHerring
Kind of a big deal
Get notified when there are additional replies to this discussion.