cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
551
Views
5
Helpful
2
Replies
Highlighted
Beginner

CMX Location API questions

Hey Everyone,

I'm trying to understand the workings of the CMX API and have a number of questions.  I'll start with maybe the simplest item, the API to get the count of active clients.

When I test the service using the 'Try it' within the apidocs utility screen or using Postman, it always returns a count of 0 clients:

...api/location/v2/clients/count

{
   
"deviceType": "Wireless_Client",
   
"deviceQueryString": null,
   
"count": 0
}

But if I use API Version 1 (using Postman only) I get what appears to be correct results:

...api/location/v1/clients/count

{

  "deviceType": "Wireless_Client",

  "deviceQueryString": null,

  "count": 6197

}

I'm using an account which is assigned only the Readonly role. Any ideas what is going on?  Note that if I try the same thing using the Cisco Sandbox (msesandbox.cisco.com:8081) both version 1 and 2 of the service seems to work fine.

Thanks.

Don

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Contributor

Re: CMX Location API questions

Hi Don,

Sorry about that, the simulator goes down from time to time, and we have to restart the APs and Wireless Clients.  I just restarted the msesandbox.cisco.com simulator called TSIM.

Please, see the discussion Re: Why are there no clients appearing in the MSE sandbox?


Now, to answer the question, why is v2/clients/count working in msesandbox.cisco.com (apidocs and postman) and not on your local CMX?  Have you upgraded to CMX 10.2.2 recently?  If yes, then the following may help.

I had the same issue after upgrading CMX 10.2.1 to 10.2.2-340.  I opened a CDETS ticket CSCva39187 to address the problem.  The solution was a hard restart (from cli sudo reboot) fixed the problem. Here is what the CMX engineers replied:

Until 10.2.2 we were persisting data in Redis. But in 10.2.2 we made it non-persistent for better performance and memory utilization. Looks like there was some data that was lingering around from 10.2.1 that caused this accumulated effect and restart fixed it as it flushed out all data.

At this point, there is nothing that we can fix. After 10.2.2 by making redis non-persistent, this issue is likely not to occur again. Can we mark this issue as Un-reproducable for now and take it up if at all it happens again?


Let us know if that fixed the problem.

Matt

View solution in original post

2 REPLIES 2
Highlighted
Frequent Contributor

Re: CMX Location API questions

Hi Don,

Sorry about that, the simulator goes down from time to time, and we have to restart the APs and Wireless Clients.  I just restarted the msesandbox.cisco.com simulator called TSIM.

Please, see the discussion Re: Why are there no clients appearing in the MSE sandbox?


Now, to answer the question, why is v2/clients/count working in msesandbox.cisco.com (apidocs and postman) and not on your local CMX?  Have you upgraded to CMX 10.2.2 recently?  If yes, then the following may help.

I had the same issue after upgrading CMX 10.2.1 to 10.2.2-340.  I opened a CDETS ticket CSCva39187 to address the problem.  The solution was a hard restart (from cli sudo reboot) fixed the problem. Here is what the CMX engineers replied:

Until 10.2.2 we were persisting data in Redis. But in 10.2.2 we made it non-persistent for better performance and memory utilization. Looks like there was some data that was lingering around from 10.2.1 that caused this accumulated effect and restart fixed it as it flushed out all data.

At this point, there is nothing that we can fix. After 10.2.2 by making redis non-persistent, this issue is likely not to occur again. Can we mark this issue as Un-reproducable for now and take it up if at all it happens again?


Let us know if that fixed the problem.

Matt

View solution in original post

Highlighted
Beginner

Re: CMX Location API questions

Matt,

Thanks for the information.  Our team did a rebuild of the virtual server which I'm sure in the process cleared the cache stored from a previous CMX version.  Now I'm getting results form the client count service in v2 of the API.  So I can continue my API survey from here.

Thanks again for your help.

Don

CreatePlease to create content
Content for Community-Ad
Cisco Community April 2020 Spotlight Award Winners
This widget could not be displayed.