I've found documentation regarding queries and parameters - for example the API Guide. Having difficulty in finding detailed attribute descriptions for the output. In my particular case I am getting all historical information for a given day and want to point an end user to the documentation to decide what they are going to want for their analysis. Still looking, but thought someone might save me time.
For example in the api location history record how to differentiate between the different mac addresses: macaddress and apmacaddress. Which would be the router and which would be the wireless device connecting. Analyzing the object structure in the Object Schema Details section of the API Guide usually gives the answer, but I was hoping for some simple object/attribute lists with detailed descriptions to give to people to decide what they want.
Hmmm.... but it is locatedAfterTime and locatedBeforeTime so I am specifying an interval with an AfterTime < BeforeTime - as in the example in the documentation.
For example the documentation is showing:
For Example: This API would use the current date as date range from midnight to current time: /api/location/v1/history/clients. This would use the passed date as date range from passed date + fromHour to passed date + toHour: /api/location/v1/history/clients?date=2016/03/02 and fromHour=14 and toHour=15. This would use the date range as mentioned by parameters: locatedAfterTime (1456894800000) milliseconds equivalent to YYYY/MM/DD HH:MM:SS 2016/03/01 21:00:00. locatedBeforeTime (1456896600000) milliseconds equivalent to YYYY/MM/DD HH:MM:SS 2016/03/01 21:30:00: /api/location/v1/history/clients?locatedAfterTime=1456894800000 and locatedBeforeTime=1456896600000.
As in my code their locatedAfterTime is less than locatedBeforeTime.
Doc example: locatedAfterTime=1456894800000 and locatedBeforeTime=1456896600000
My example: locatedAfterTime=1471352400000&locatedBeforeTime=1413533000000
What object field is the query code using?
Jon A. Barry
Research Computing Services
Data Base Systems Administration
I remember what the question I was leading to before I went off track. Can you tell me which object field(s) in the related output and what the algorithm(s) are used for the epoch comparison? Or, are the actual fields used not in the output?
I believe the changeOn timestamp is the key field for the client history query. Note, the changeOn (UTC) and sourceTimestamp (UTC) are also the same time as the lastLocatedTime (Galway, Ireland), if you are using the DevNet CMX 10.2 Sandbox at https://devnetapi.cisco.com/sandbox/mse/api/.
I had no luck specifying time slices less than one hour using locatedAfterTime and locatedBeforeTime. I got the error as per the documentation:
"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."
Is this going to be addressed?
CSCuz69078 is in Verified state marked as Severe with no work arounds. Looks like scheduled for fix in 10.2.3, release date not known at this time.
I know all this stuff is an appliance, but we'd really like to get credentials to the MSE data base underneath to get exactly what we want. Then we'd just have to deal with new/changed DBMS schemas instead of an API that gets totally changed and causes all softwhere that uses it to be revised or break especially if the function and granularity of it become unavailable. Do you know if this would be possible? I know that the schema for the DBMS sometimes is considered proprietary. We can get a backup from the system and try loading it on another Oracle instance, but at this point it is research and Oracle licensing is big $$$ that nobody wants to pay.
For the moment there isn't using this data so our network folks are only concerned about the network software keeping up to date until this becomes important enough that true production dependencies get created with the right amount of clout to create a migration and test process for upgrades to the network software.
See the discussion Re: CMX - Direct access to database
I wish there was more to share regarding accessing location data directly, but stay tuned, I'll see what I can find from engineering and solution partners.
I haven't found any new information regarding access to CMX database. I will try to get someone to write a blog or update a presentation about CMX 10.2.x databases for us. So far, the information has not been shared very widely.
The recommended method to accessing large amounts of location data is by using a streaming notification listener, parse and populate to a local database. The Notification subscription API allows an application to register for Push Notifications from CMX. A notification subscription will trigger a stream of notifications for every location calculation, for a specific mac address, or a list of mac addresses, or with wildcard for a specific device type. Notification Listener sample code is available at https://msesandbox.cisco.com:8081/apidocs/code The 10.2.x stream is HTTP stream. The MSE 8.0 is TCP raw stream and requires a different listener for protobuf format. Using multiple notification subscriptions for stream data requires a listener for each subscription.
I'll keep asking for direct access to CMX database, and will forward the information.
Matthew - Any date where the REST MSE history query fix (CSCuz69078) might be implimented? You mentioned it was to be 10.2.3. Wondering if there is a schedule for this yet.
Just getting back to our project and going to look into the notification subscription, but hoping we can get our old solution working if 10.2.3 is right around the corner.
It shows the fix is available in 10.2(3). The actual CDETS ticket shows applied to 10.2(3), however in status shows Verified, not Resolved state.
The release notes do not actually say which bugs were fixed in 10.2.3.
I assume it has been fixed in the latest CMX general release 10.2.3.
Cisco DevNet Developer
Phone: +1 303 308 3265
Mobile: +1 303 249 3668
Duuuhhh....... Typo. I knew it had to be knuckleheaded.Been looking at it too hard. I think I still have a question in here somewhere, but let me get further now.