cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
646
Views
4
Helpful
4
Replies
rthiramp
Cisco Employee

CMX - How to get connected devices by apMacAddress(AccessPoint)?

Hi

Is there any API in CMX to get connected,detected and total devices based on access point (apMacAddress).

I have tried below API but this reset API with apMacAddress is not working. It is returning all.

https://cmxlocationsandbox.cisco.com/api/location/v2/clients?apMacAddress=x.x.x.x

4 REPLIES 4
matfarre
Frequent Contributor

Hi,

Please see this discussion Getting Active Client Count Per AP.

For example using the CMX 10 Location sandbox, first find the  floorRefId value.  Use the resource GET https://cmxlocationsandbox.cisco.com/api/config/v1/maps/info/DevNetCampus/DevNetBuilding/DevNetZone

returns "aesUid":723413320329068590 for DevNetZone.

Then use the resource GET https://cmxlocationsandbox.cisco.com/api/location/v1/clients?floorRefId=723413320329068590&apList=true&_=1503937894731

where Unix POSIX or epoch time in milliseconds is used for today.  This returns clients by macAddress, connected by apMacAddress, detected by apList, etc.  Total connect per AP would require a count of connected by apMacAddress.


Let us know if that works,

Matt

Thanks Matthew,

You have mentioned time in milliseconds "1503937894731" in above rest call. Is it UTC time or CMX server local time?

Thanks,

Rajesh

matfarre
Frequent Contributor

Will convert to UTC time.

https://en.wikipedia.org/wiki/Unix_time

Unix time (also known as POSIX time or epoch time) is a system for describing instants in time, defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday,1 January 1970, minus the number of leap seconds that have taken place since then.

Thanks Matthew

Content for Community-Ad

This widget could not be displayed.