GET OrgDevices - Devices Missing

Solved
DreamTFK
New here

GET OrgDevices - Devices Missing

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?

 

DreamTFK_0-1710359115044.png

 

1 Accepted Solution
sungod
Head in the Cloud

Like @alemabrahao and @RaphaelL 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 @Jamieinbox or write one yourself using the Meraki Python library (it can handle the pagination for you)...

https://github.com/meraki/dashboard-api-python

 

View solution in original post

12 Replies 12
alemabrahao
Kind of a big deal
Kind of a big deal

I suggest you open a support case.

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.

How many devices do you have?

alemabrahao_0-1710360119362.png

 

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.

If I perform an Organization export from the dashboard, I see 1,667 lines on the CSV file.

It says per page. The number of devices per page doesn't really concern me. Does this mean it will not export every page?

Have you tried this one?

 

https://developer.cisco.com/meraki/api/get-organization-inventory-devices/

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.

They will not help and will tell you that you need someone to do scripting.

ww
Kind of a big deal
Kind of a big deal

Are the missing devices assigned to a network or, in your inventory but not assigned to networks

If I look through all devices (Org > Inventory) and search by Used and Unused, yes I do see devices not in a network.

Jamieinbox
Getting noticed

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)

RaphaelL
Kind of a big deal
Kind of a big deal

You have over 1K devices. You have to use pagination. The Meraki SDK already covers that.

Sorry but I don't really know what that means. Do you have a link that covers how I can resolve this?

sungod
Head in the Cloud

Like @alemabrahao and @RaphaelL 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 @Jamieinbox or write one yourself using the Meraki Python library (it can handle the pagination for you)...

https://github.com/meraki/dashboard-api-python

 

Get notified when there are additional replies to this discussion.