03-13-2024 12:45 PM
Hello. First time using the Meraki API. I am conducting an assessment for a customer who has almsot 100 networks under their org. I would like to export inventory for the entire Org and I like the info that the API gives me versus the built in dash export tool (like including local IP for example).
The problem is that after running the API call named 'getOrganizationDevices' the list it returns is not completed. I have found random missing devices such as switches and MX devices. Does anyone have an idea as to why this may be happening?
Solved! Go to Solution.
03-14-2024 07:02 AM
Like @alessandrodematos and @Raphletourn say, results are returned in 'pages', for the endpoint you are using the maximum is 1,000 devices per page.
If you have more than 1,000 devices, you will need to follow the pagination rules to get the next page(s) of results, see...
https://developer.cisco.com/meraki/api-v1/pagination/
Ypu can use the script from @Jamiegprice15 or write one yourself using the Meraki Python library (it can handle the pagination for you)...
03-13-2024 12:57 PM
I suggest you open a support case.
03-13-2024 01:02 PM
How many devices do you have?
03-13-2024 01:22 PM
If I perform an Organization export from the dashboard, I see 1,667 lines on the CSV file.
03-13-2024 01:24 PM
It says per page. The number of devices per page doesn't really concern me. Does this mean it will not export every page?
03-13-2024 01:04 PM
Have you tried this one?
https://developer.cisco.com/meraki/api/get-organization-inventory-devices/
03-13-2024 01:21 PM
They will not help and will tell you that you need someone to do scripting.
03-13-2024 01:00 PM
Are the missing devices assigned to a network or, in your inventory but not assigned to networks
03-13-2024 01:26 PM
If I look through all devices (Org > Inventory) and search by Used and Unused, yes I do see devices not in a network.
03-13-2024 01:08 PM
This will get all the APs (not Meraki switches or other gear) and place it into a spreasheet.
Merakicode/AssetDataDump at main · jadexing/Merakicode (github.com)
03-13-2024 01:25 PM
You have over 1K devices. You have to use pagination. The Meraki SDK already covers that.
03-13-2024 01:27 PM
Sorry but I don't really know what that means. Do you have a link that covers how I can resolve this?
03-14-2024 07:02 AM
Like @alessandrodematos and @Raphletourn say, results are returned in 'pages', for the endpoint you are using the maximum is 1,000 devices per page.
If you have more than 1,000 devices, you will need to follow the pagination rules to get the next page(s) of results, see...
https://developer.cisco.com/meraki/api-v1/pagination/
Ypu can use the script from @Jamiegprice15 or write one yourself using the Meraki Python library (it can handle the pagination for you)...
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