The CMX Presence Notifications feature provides notifications when the presence of passersby is detected, when passersby become visitors, when visitors have left the network, and when the site entry changes.
Take a look at the learning lab "CMX Deep Dive using the Notifications resource" which explains the CMX notification resource better than I can in a reply post, see https://learninglabs.cisco.com/modules/getting-started-with-cisco-cmx. The section at the bottom of Step 3. titled "Determine how the REST API body is formatted", is a method to see how the body is formatted is to first create the notification in the CMX graphical user interface using the Manage Notifications page, and then use the REST API GET notifications by name to see the body of the notification subscription.
Next I would check the available API resources for both Configuration (APIs to configure the Cisco CMX programmatically) and Presence (APIs to find visitor presence data) by visiting the apidoc pages:
- https://cmxpresencesandbox.cisco.com/apidocs/configuration-api#Notification-subscription-API-PUT-Add-notification-subscription
- https://cmxpresencesandbox.cisco.com/apidocs/presence-api
For the Notification Subscription API see the following document for "notificationType" available in the following reference:
- https://www.cisco.com/c/en/us/support/wireless/connected-mobile-experiences/products-programming-reference-guides-list.html
We have two DevNet CMX sandboxes for the following systems.
1) API for PRESENCE instance
2) API for a CMX Cloud instance
Either of these instances may be used to train with for PRESENCE API resources, with slight differences. The difference is when you use API in Cloud you need to find and add a "siteId" to the API request, and fewer API resources are supported. Also, no northbound notifications today for CMX Cloud.
To find siteId
Once you have logged in with a different Chrome TAB, your browser will give you the authentication token required to get the SITEID.
Then use this API to get the site ID.
https://<tenant-id>.cmxcisco.com/api/config/v1/sites
The aesUId is the SITEID that you should use...
https://<tenant-id>.cmxcisco.com/api/presence/v1/connected/count/yesterday?siteId=<SITEID>
(Note: Make sure you use siteId (case is important). siteid or siteID will NOT work.
Use siteId=XXXX.
Comments
0 comments
Please sign in to leave a comment.