Hi, there's this endpoint called GET: All Clients, where I can pass an username as a string parameter and it gives me back the user location. Is it possible to instead of passing just one username I pass a list of usernames?. Thanks
Hi, Let me check with the the CMX API engineers for advise. Which version of CMX are you using? Thanks for the question, Matt
No reply yet from the mailer group. I'll try again.
What is the query parameters look like to get locations for a list of usernames. This customer is using 10.2.2-340.
Two options 1) sending request for each username, or 2) searching the GET /api/location/v2/clients?sortBy=userName:ASC which returns all clients including with no usernames are both alternate solutions.
Yeah, the problem is that both of these options are not very efficient. I am currently using the 1º option but I have to send like 40 requests and it would be great to make only one request and get all the data I need.
According to the CMX api folks you must use one of the options and possibly programmatically iterate over the list of usernames.
I was given additional information which sheds light on the location database and usage of parameters such as ipaddress, macaddress, and username. Here it is below.
CMX gets the USERNAME if the client associates and authenticates to the network while NMSP is up.
If the authentication occurs before, you may get no USERNAME.
If CMX has no message from controller that includes the username, it is not in the database and not accessible via the API.
We have a lot of users connected to the Wi-Fi. It is not a very good idea to iterate over a list of six thousand users just to get around 40 of them, and we will be doing this quite often so the performance will degrade.
Maybe you could sort and filter the target list before running your query, or combine query with another thing you are doing with the data. Using the API resource to get all clients (option 2) will require pagination since response is limited to thousand at a time.
Thanks for the question,
Yes, I could store the list somewhere but the problem is that it changes a lot over time, so I would always have to be updating the list to the newest version. Not good.