API for detailed client info (Systems Manager)

jrich
New here

API for detailed client info (Systems Manager)

Im trying to query for the data that shows up in the Dashboard client list. 

 

The API itself returns very basic info and looks like this

 

[ { "usage": { "sent": 138.0, "recv": 61.0 }, "id": "k74272e", "description": "Miles's phone", "mdnsName": "Miles's phone", "dhcpHostname": "MilesPhone", "mac": "00:11:22:33:44:55", "ip": "1.2.3.4", "vlan": "", "switchport": null } ]

 

If you look at the dashboard it has additional info, such as OS and a Connected field that shows "now" or a date. 

 

What about stuff from the "Security" view? User/AV/Encryption etc etc

 

Are there any better API  docs than this?

https://dashboard.meraki.com/api_docs

 

I ask, because, for example, if you look at the Client request, there is a a Serial route which isnt marked or explained (wants the device serial, but, the docs should state what it expects and where it comes from). Also the Parameter doc doesnt tell you its mandatory (that wasted some of my time)

 

 

3 REPLIES 3
PhilipDAth
Kind of a big deal
Kind of a big deal

That is an authoritative API reference, and alas, I believe that is as good as it gets for the moment.

DexterLaBora
Meraki Employee
Meraki Employee

You can use the new "return a client" endpoint that was just released. It includes the OS, first & last seen times, among other helpful details.

 

Doc

 

GET /networks/[networkId]/clients/[id_or_mac_or_ip]

 

 

Successful HTTP Status: 200
{
  "usage": {
    "sent": 138.0,
    "recv": 61.0
  },
  "id": "k74272e",
  "description": "Miles's phone",
  "mdnsName": "Miles's phone",
  "dhcpHostname": "MilesPhone",
  "mac": "00:11:22:33:44:55",
  "ip": "1.2.3.4",
  "vlan": "255",
  "switchport": null,
  "ip6": "",
  "firstSeen": 1518365681,
  "lastSeen": 1526087474,
  "manufacturer": "Apple",
  "os": "iOS",
  "user": "null",
  "ssid": "My SSID",
  "wirelessCapabilities": "802.11ac - 2.4 and 5 GHz",
  "smInstalled": true,
  "recentDeviceMac": "00:11:22:33:44:55",
  "clientVpnConnections": [
    {
      "remoteIp": "1.2.3.4",
      "connectedAt": 1522613355,
      "disconnectedAt": 1522613360
    }
  ],
  "lldp": [
    [
      "System name",
      "Some system name"
    ],
    [
      "System description",
      "Some system description"
    ],
    [
      "Port ID",
      "1"
    ],
    [
      "Chassis ID",
      "00:18:0a:00:00:00"
    ],
    [
      "Port description",
      "eth0"
    ],
    [
      "System capabilities",
      "Two-port MAC Relay"
    ]
  ],
  "cdp": null
}

 

BlairM
Just browsing

 

Hi everyone, sorry for replying to an old topic but I didn't see anything else close to what I am looking for, and would prefer to do this rather than create a new topic.

 

As you can see in the screen shot below, via the dashboard, I'm able to list the OS and even export it via CSV. This is great, but is only good per-network.  I can't list all devices on all networks at once.  However, when I try to query the same OS info via the API, it's hit or miss at best. It only ever shows "Windows", where the dashboard shows the various versions of Windows detected.

 

BlairM_1-1657391536628.png

 

I'm using the networks endpoint refrenced above:

https://api.meraki.com/api/v1/networks/<NETWORKID>/clients

 

Below is an example of a few of the fields retrieved when looping through the clients retrieved.  OS2 field is the field deviceTypePrediction.

 

BlairM_2-1657391580329.png

 

Below are all the fields for one device, where it just shows "Windows", where the dashboard shows "Windows7/Vista".

 

BlairM_3-1657391584059.png

 

Is there something I'm missing?

 

Thanks!

Get notified when there are additional replies to this discussion.