08-11-2026 07:00 AM
Starting to get this more and more in a script we've been using for over a year (it uses a few CSV files to build a new network in the dashboard with all the standard settings).
The problem started in the function that updates the info for devices in a network.
Then, if it gets through the UpdateDevice API calls without an issue, I randomly get the error again in the function that updates the WAN IP info on the MX.
This is the code for updating the Device Info...the data is pulled in from a CSV file and the various data is entered into a list of dictionary objects, which is then used in this function. Nothing crazy. I've checked the CSV file in Notepad++, and the data looks good to me.
These aren't the first API calls in the script...the claimNetworkDevices and createOrganizationNetwork are two API calls that have no issues and are called before these API calls.
Any advice or help would be appreciated.
08-11-2026 07:10 AM - edited 08-11-2026 07:14 AM
It was not clear at what stage it was failing.
Does this 404 crash happen on the very first device in the loop, or does it happen randomly on a device in the middle of the list?
If you run the len (serialNum) print statement, what is the exact character count returned for the failing device?
I take that you can reach the API
https://developer.cisco.com/meraki/api-v1/errors/
=====️ Preenayamo Vasudevam ️=====
***** Rate All Helpful Responses *****
08-11-2026 08:53 AM
So, it can happen randomly in the loop....
I tested this morning, and it gave that 404 error to the first device a few times. Then randomly, when running the script again, the first device made the UpdateDevice API call just fine, and the second device failed with the same error. And then randomly a few times later, it got through all the devices just fine, and failed on the WAN IP Update API call (which is the next function in the script).
The script always connects to the Dashboard fine, and runs a few API calls without issue before I get these 404 errors (getOrgNetworks, claimNetworkDevices, createOrgNetwork, to name a few).
08-11-2026 02:30 PM
Well, shoot. It looks like I needed to add a decent "pause" to my script before making updates to devices that were just claimed in a network.
Just added a time.sleep(15) function immediately AFTER the claimNetworkDevices API call (and before any other API call after that). I don't know if the pause needs to be 15 seconds, but that seems a safe amount of time.
That seems to have solved the issue...I'm going to keep testing, but it may just be as simple as the Meraki dashboard needing time to process the change in status of the devices (unclaimed to claimed).
08-11-2026 03:56 PM
If the devices are being added to a brand-new network, the network may not be available immediately after creation.
What you could do is introduce a loop to query the network and see if you can find it, and if not, do a short pause and retry - and then start the process to add the devices.
I think you are pretty unlucky. Networks tend to become available very quickly after they are created.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide