Unclaimed devices not being returned in API call

SOLVED
Leo_Miller
New here

Unclaimed devices not being returned in API call

Good afternoon,

 

When I try to pull the inventory for our organization, it does not appear to be returning the unclaimed devices in the list.  I can see them in the dashboard, but none of the API calls I am using returns them.  Is it possible to get the unclaimed devices to show up?

 

These are the methods I am using:

 

 

 

# Get devices in organization, looking for unclaimed
devResponse = dashboard.organizations.getOrganizationInventoryDevices(ORG['id'], total_pages='all')
# pprint(devResponse)
with open('inventory.json', 'w') as outDEVS:
	json.dump(devResponse, outDEVS, indent=4)
# Get devices in organization, looking for unclaimed
devResponse = dashboard.organizations.getOrganizationDevices(ORG['id'], total_pages='all')
# pprint(devResponse)
with open('inventory.json', 'w') as outDEVS:
	json.dump(devResponse, outDEVS, indent=4)

 

 

 

EDIT:
I looked at our inventory again and maybe I worded my question incorrectly, the devices do have claimed dates, but are not assigned to any network and do not show in the inventory list when I pull it.

 

Thank you,

Leonard

 

1 ACCEPTED SOLUTION
Greenberet
A model citizen

I've just tried it out.

 

getInventoryDevices will show all devices. There is also an "usedState" parameter to filter the devices. You can set it to "used" or "unused" (not assigned to any network)

View solution in original post

1 REPLY 1
Greenberet
A model citizen

I've just tried it out.

 

getInventoryDevices will show all devices. There is also an "usedState" parameter to filter the devices. You can set it to "used" or "unused" (not assigned to any network)

View solution in original post

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.