cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5053
Views
0
Helpful
9
Replies

Inconsistent device output

jjabson
Level 4
Level 4

Hi All,

I'm wondering why there's so much inconsistency with the APIs that return a device:

org/device/statues:

{
"name": "Meraki_MX65",
"serial": "xxxxxxx",
"mac": "",
"publicIp": "",
"networkId": "",
"status": "online",
"lastReportedAt": "2024-02-23T19:01:18.054000Z",
"productType": "appliance",
"components": { "powerSupplies": [] },
"model": "MX65",
"tags": [],
"usingCellularFailover": false,
"wan1Ip": "",
"wan1Gateway": "",
"wan1IpType": "dhcp",
"wan1PrimaryDns": "",
"wan1SecondaryDns": "",
"wan2Ip": null
},

org/devices:

{
"name": "Meraki_MX65",
"serial": "xxxxx",
"mac": "",
"networkId": "",
"productType": "appliance",
"model": "MX65",
"address": "",
"lat": 37.3644,
"lng": -121.91518,
"notes": "",
"tags": [],
"wan1Ip": "",
"wan2Ip": null,
"configurationUpdatedAt": "2024-01-02T12:20:08Z",
"firmware": "wired-18-1-07",
"url": "https://n27.meraki.com/lab-net-firewall/n/1puaKcB/manage/nodes/new_list/247165638139553",
"details": []
},

network/devices:

{
"lat": 37.3644,
"lng": -121.91518,
"address": "",
"serial": "xxxxxxxx",
"mac": "",
"wan1Ip": "",
"wan2Ip": null,
"url": "https://n27.meraki.com/lab-net-firewall/n/1puaKcB/manage/nodes/new_list/247165638139553",
"networkId": "",
"tags": [],
"name": "Meraki_MX65",
"details": [],
"model": "MX65",
"firmware": "wired-18-1-07",
"floorPlanId": null
}

If I wanted to filter using Network ID and get all the devices under that network, you'll notice there's a bunch of attributes missing from the other two APIs (using Org Id). Is there a reason why all the JSON output is so different?

Thanks in advance,

-Jerome

9 Replies 9

aleabrahao
Meraki Community All-Star
Meraki Community All-Star
I advise you to urgently remove this post, it has Serial Number and Network ID information.
This exposes your network.
I am not a Cisco 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.

@alessandrodematosThanks removed both serial and network id

aleabrahao
Meraki Community All-Star
Meraki Community All-Star

If you need organization-wide information or real-time status information, you would need to use the org/devices or org/device/statuses APIs respectively.

I am not a Cisco 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.

@alessandrodematos- Yeah I get that. However, there's attributes that we need at the Org level that missing in the network level. As I mentioned, if I have an App that wants to filter devices using network ID, then the devices returned is missing information needed.

aleabrahao
Meraki Community All-Star
Meraki Community All-Star

Well you can try calling the network/devices endpoint with the Network ID to get the list of devices in the network and for each device, call the org/devices endpoint with the Org ID and the device’s serial number to get the additional attributes.

It's just an attempt, I don't know if it will work.

I am not a Cisco 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.

@alessandrodematos- Well doesn't that defeat the purpose here? If APIs are provide to get devices from a different hierarchy, why not just give the same device info? Why do I have to call two APIs when I can just use one at the network level? Honestly, I could just call the one API (org/device/statues) and I'd be done. However, if you're providing an API to get device info at the network level why give different output?

aleabrahao
Meraki Community All-Star
Meraki Community All-Star

Oh, this is something you have to question Meraki about.

I am not a Cisco 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.

Rasmus Hoffmann Birkelund
Meraki Community All-Star
Meraki Community All-Star

In general, I don’t see inconsistencies in the data provided from the different endpoints. All the data seems to match.

As for which attributes are present in which endpoints, I can not say.
If you want something specific to be added, your best bet is to log it in “Make a wish” and perhaps open a ticket with Meraki support and have it logged as a feature enhancement, preferably with a use case and business case.
Then you’ll have to hope for it to be added in the future.

#########
LinkedIn ::: https://blog.rhbirkelund.dk/
Like what you see? - Mark as helpful ## Did it answer your question? - Mark it as a Solution 🙂
All code examples are provided as is. Responsibility for Code execution is solely your own.

jjabson
Level 4
Level 4

@Rasmus Hoffmann Birkelund- Here's what are the attributes missing from the output:

1. public IP (in org/device/statuses, missing in org/devices and network/devices)

2. wan gateway (in org/device/statuses, missing in org/devices and network/devices)

3. dns entries (in org/device/statuses, missing in org/devices and network/devices)

Sure I can file "Make a wish" and also open a case. However, it's been my experience that these types of request aren't top priority. I'm just trying to understand if an API is provided to get devices why can't they just be all the same?