In the sandbox env, when I call /api//location/v1/history/clients, I got an http error 500.
The response body is "PRIMARY KEY column \"changedon\" cannot be restricted (preceding column \"key\" is either not restricted or by a non-EQ relation)"
Hi, Please, see MSE API Large Query Question if this thread answers your questions. Let us know if it persists. Thanks, Matt
I'm seeing this issue also - the MSE API Large Query Question thread does not answer what we should expect the output to be of /api//location/v1/history/clients.
MSE 8.0 supports pagination. Pagination in the resources is done by specifying query Params “page” and “pageSize”. The default pagesize is 5000. When there is more than one page, the nextResourceURI will specify the URI to the next resource. e.g., https://msesandbox.cisco.com/api/contextaware/v1/location/history/clients?page=1&pageSize=10
For MSE 10, the /v1/ API has a max of 2000 records, and does not support pagination. The API to return the history of all clients in CMX is limited to 2000 entries. You can filter this API by time period to get less.
For MSE 10, the /v2/ API will be available soon, and has a max of 2000 records per PAGE, you can send pagination requests to get more clients.
The system needs to be able to chuck out the data based either on time (preferred) or pages (v2, more load on system, less preferred). Both V1 and v2 will be maintained.
The BEST method to get MASSIVE data from CMX is to subscribe to notifications that occur whenever we calculate a new location, and to build their own history database through Northbound Notifications.
v2 allows you to get full database.
Hope this helps,
Thanks Matt, this does help. I am able to pull history data when I add a MAC address as a parameter to the query, as in your example. However, neither pagination nor constraining by time allow me to pull history data for multiple clients (e.g. a query like https://msesandbox.cisco.com:8081/api/location/v1/history/clients/?date=2016/05/31). In this case, I end up with the same error as referenced above.
Here is the CMX REST Documentation for this query
You can use date & fromHour & toHour for date=2016/05/31:
or you can use locatedAfterTime & locatedBeforeTime for date=2016/05/31:
Do not forget the basic authorization string (for msesandbox.cisco.com:8081 is learning/learning), else you will get a CMX: System error with Status of 401.
Evaluation License for CMX 10 sandbox should be updated and be available again, soon.
I'm actually working on a 3365 locally - just used the sandbox IP as an example. In limited testing, I'm finding that a 3365 with 10.2.1 throws the error 500, and 10.2.2 delivers the data. Will test this hypothesis further by upgrading another box.
Can you confirm the status of this bug?
/v1/history/clients API giving invalid response.
The CSCuz69078 is in V-Verified status, tested on CMX 10.2.2, and Severe Sev2. No workaround.
Release Notes will have the following:
With CSCuz69078, when locatedAfterTime and locatedBeforeTime specified in API is more than a day and less than an hour, the API returns the following error.
ERROR - Cassandra timeout during read query at consistency ONE (1 responses were required but only 0 replica responded)
For example, https://<ip-address</api/location/v1/history/clients?locatedAfterTime=1459468800000&locatedBeforeTime=1459636800000 returns the ERROR.
Retrieving data ...