Firmware Upgrades via Meraki Dashboard API

Andre_duToit
Conversationalist

Firmware Upgrades via Meraki Dashboard API

Hi All,

I'm a developer looking to Automate the Upgrades of a Specified Network in Meraki. Although i'm no network Expert, im looking for some information regarding the following when it comes to the following API Endpoints:

updateNetworkFirmwareUpgrades:

This API Endpoint seems to be the one where you specify the core details of a Network's Upgrade structure, per Product Type thats supported. But it seems you have to specify DayOfWeek and HourOfDay parameters, but not a Target Date for when this is supposed to happen? Also, you can specify TimeZone Details, and although the API Gives an example of a TimeZone that can be submitted, im not sure if this matches the Wiki for Timezones here (TZ Identifier):

List of tz database time zones - Wikipedia

updateNetworkFirmwareUpgrade(StagedStages/StagedGroup/StagedEvents):

Here is where my mind gets thrown for a loop, in conjunction with updateNetworkFirmwareUpgrades, which of these API Endpoints do i need to invoke for a scheduled upgrade? And in the event i need to cancel it via the API, do i use any of the above API Endpoints to do that?

Any and all responses are very welcome,


Thanks In Advance.
Andre

8 Replies 8
pdeleuw
Building a reputation

The API documentation https://developer.cisco.com/meraki/api-v1/update-network-firmware-upgrades/ shows several parameters like timezone and products. The section "products defines" which product you want to upgrade, and the time you want to upgrade. You cannot update a specific device. You can only update all cameras, all accesspoints, etc. 
Switches can be upgraded in groups. The feature is called staged upgrades. The API docs you find at https://developer.cisco.com/meraki/api-v1/create-network-firmware-upgrades-staged-event/

 

To cancel an upgrade, you have to reschedule to another time in the future.

 

Edit: In the dashboard it is possible to set the firmware upgrade to "ignore". This is not documented for the API. I have a network configured with this parameter. The API GET requests has the result:

 

"nextUpgrade": {
"time": "",
"toVersion": {}
 
Maybe you can set this values to cancel the update.
Andre_duToit
Conversationalist

Thanks a lot for the reply, pdeleuw! I'll have a look at what you're mentioning and play around a bit to ensure the behavior is as expected. 

Andre_duToit
Conversationalist

Hi There @pdeleuw 

I've tried submitting that exact Payload with no luck. It seems that once you Put the nextUpgrade values and it registers it, simply nulling those fields don't act as a cancellation:

And i would expect it to Throw 403 if i didnt have the appropriate access to submit those values.

Any Alternative Ideas as to how to Cancel a Scheduled Upgrade?

PhilipDAth
Kind of a big deal
Kind of a big deal

I don't know the answer.

 

What happens if you send a DELETE request instead of a PUT?

pdeleuw
Building a reputation

A DELETE action is not documented. You can use DELETE only on Endpoints you have created with POST.

PhilipDAth
Kind of a big deal
Kind of a big deal

I believe the below is used to define a regular upgrade for Meraki to apply updates.  For example, this means Meraki can apply upgrades any Sunday at 4am.

PhilipDAth_0-1756147823576.png

 

And the "time" field here is used to say when you want to apply a specific update.

PhilipDAth_1-1756147894945.png

pdeleuw
Building a reputation

I agree. The first one is the setting of the upgrade window for the Meraki-scheduled upgrades. In the dashboard it is set under Network-wide > Configure > General. The time zone is set above on the same configuration page, too. The upgrade window is the network local time.

The second one is the setting for the custom upgrade setting, in the dashboard just below the upgrade window setting. It is set per product.

Surprisingly, the API call shows the time zone. Seems you can set it via PUT /networks/{networkId} and via PUT /networks/{networkId}/firmwareUpgrades.

Andre_duToit
Conversationalist

Thanks Phillip, This helps alot, i'll try the Latter function and let you guys know what the outcome was.


Thanks again for all the help!

Get notified when there are additional replies to this discussion.