cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1394
Views
1
Helpful
14
Replies
Beginner

CMX 10.4 historylite system error

Hello,

When using the API on CMX 10.4 for requesting historical clients, I am using the following:-

<domain>/api/location/v1/historylite/byusername/<username>?date=2018/01/01&allMacs=true


The return result is "CMX: System error".


I can pull the current clients no problems, but I always get the system error on history requests.


Any ideas on why?


Thanks!

14 REPLIES 14
Highlighted
Frequent Contributor

Re: CMX 10.4 historylite system error

Hi Trevor,

Using DevNet Sandbox running CMX 10.4.1-2 with credentials learning/learning.

GET https://cmxlocationsandbox.cisco.com/api/location/v1/historylite/byusername/matfarre?date=2018/01/01&allMacs=true

returns 200 ok. 

The url and parameters look good, need to check the authorization is correct.

Please, provide more information such as CMX version, and methods of calling API.

Thanks.

Highlighted
Beginner

Re: CMX 10.4 historylite system error

The authorization is correct since calling active clients works fine ie: /api/location/v3/clients?username=<username>

I am using CMX 10.4.1-2 and testing via the API reference page on the server. I've also tried using curl remotely to pull the results.

After checking some other "Location" API methods such as interferers and rogue aps, they also do not work and report "System error". Seems the only API method working is the active clients.

Highlighted
Frequent Contributor

Re: CMX 10.4 historylite system error

Hi Trevor,

From Cisco CMX Configuration Guide, Release 10.4.

Let us know if this was the issue.

Thanks,

Matt

Setting Device Tracking Parameters

Procedure


Step 1 Log in to Cisco Cisco Mobile Connected Experiences (Cisco CMX).
Step 2 Choose System > Dashboard. The System at a Glance window is displayed.
Step 3 Click Settings at the top-right corner of the window. The SETTINGS window is displayed.

By default, the Tracking Parameters tab is displayed.

Step 4 In the Elements column, check the check box of each device that you want to select for tracking.Figure 1. Tracking Parameters

Only the elements selected here will be tracked by the network location service and will appear on the Activity Map window.

The following elements are available for tracking:

  • Wireless Clients
  • Rogue Access Points
  • Rogue Clients
  • Interferers
  • RFID Tags
  • BLE Beacons
Note  BLE capable APs are discovered by Cisco Prime Infrastructure. Use Cisco Prime Infrastructure to place the APs on the maps and export the maps. Cisco CMX will utilize the map file exported from Cisco Prime Infrastructure.Bluetooth low energy (BLE) beacons are detected in two ways:
  • Clean air over NMSP—To enable this tracking method, check Interferers option. You require a Cisco WLC with software Release 8.0.115.0 or later for this method.
  • Fast path over UDP—To enable this tracking method, check BLE Beacons option. You require a Cisco WLC with software Release 8.6.1.146 or later for this method.
Step 5 Click Save.
Highlighted
Cisco Employee

Re: CMX 10.4 historylite system error

The CMX 10.4 have a new APIv3 -- New API version 3 for Active Clients

Highlighted
Beginner

Re: CMX 10.4 historylite system error

That's correct and that is the version I am using. The Active Clients works fine, the Clients History API does not work.

I did check the "Tracking Parameters" and the only 3 unchecked were the Rogue APs, Rogue Clients and BLE.

Highlighted
Beginner

Re: CMX 10.4 historylite system error

Okay this is interesting. I decided to do some investigation into the logs and in the location/error.log discovered this:-

2018-02-12T16:56:56,298 [qtp1591409408-508] ERROR com.cisco.mse.configuration.aaa.dao.UserDao - Failed to find user:<cmx api username>

2018-02-12T16:56:56,298 [qtp1591409408-508] ERROR com.cisco.mse.aaa.security.realms.CMXBasicAuthRealm - There was a error while authenticating user [<cmx api username>]


This appears when I try to do a "This API returns a compact history of client by date and username" via the API reference page. The API user and password is entered at the top right of the page.


I just tried the same request using curl remotely and received the same error.


Edit: I just reset the API username using this:-   cmxos apiserver user

same result... failed to find user:<cmx api username>

Highlighted
Frequent Contributor

Re: CMX 10.4 historylite system error

Hi Trevor,

Let me open a bug report for CMX.  I may need additional info when the engineering team starts looking at it.  I have enough info to open the ticket.

Thanks.

Highlighted
Frequent Contributor

Re: CMX 10.4 historylite system error

Trevor,

Ticket opened - CSCvh95839(CSC.embu,new,matfarre)CMX 10.4 historylite system error.

Please, try changing or adding your username/password from the Manage tab under Users and see if that resolves anything.

Thanks.

Untitled.png

Highlighted
Beginner

Re: CMX 10.4 historylite system error

Hey Matthew,

Thanks for opening a ticket. I just tried using a cmx login user account for the API and the results for historylite worked. I also tried interferers and rogue APs using the login account instead of the API user and these worked as well.

Highlighted
Frequent Contributor

Re: CMX 10.4 historylite system error

Hi Trevor,

That is good news.  I'll update and close the ticket.

Thanks.

Highlighted
Beginner

Re: CMX 10.4 historylite system error

Hey Matthew,

Does that mean these type of requests are authorized by a CMX user account and not a CMX API services account?

Sounds like I should create the same API account on the CMX server side to allow either API active client queries or history queries.

Highlighted
Frequent Contributor

Re: CMX 10.4 historylite system error

Hi,

I have asked engineering, regarding system credentials and ui/api credentials, for a good description, and use, of each credential used with CMX?  e.g., cmxadmin, root, ui, etc.  I will follow up soon.

Matt

Highlighted
Frequent Contributor

Re: CMX 10.4 historylite system error

Hi Trevor,

Here is something that we didn't consider as the problem several weeks ago.  New for CMX 10.4 is a new API username and password, and is only required for the new Active V3 Clients API resource.  Here is the comment from Cisco CMX 10.4 REST API Guide.

Thanks.

/api/location/v3/clients/count

/api/location/v3/clients

The API Username is set using the cmxos apiserver user command. This will change the username and password just for the Active V3 Clients API.

Highlighted
Beginner

Re: CMX 10.4 historylite system error

With the newer version of CMX, now with 10.6 released, will the Client History API be updated to V3 API?  Or will the v1 API's ever be switched to use the API server credentials?

 

I ask because when creating scripts to use the various CMX API I do not want to have to use the CMX GUI credentials for the v1 API's and then use the API server credentials for the v3 API's

CreatePlease to create content