You can use REST APIs to retrieve, add or modify information on the Detect and Locate. The REST APIs are dived into four categories:
- Active clients’ location APIs – APIs to retrieve clients count and location data.
- Clients location history APIs – APIs to get the devices MAC address list and the details for a given device.
- Notifications APIs - APIs for the subscription-based notifications.
- Map APIs – APIs to upload, navigate the maps hierarchy, retrieve and delete map element etc.
- Access points APIs – APIs to get access points count and list.
For a complete list of Rest APIs, refer to the Cisco DNA Spaces: Detect and Locate API Reference Guide.
To use REST APIs, you must generate a API Key. An API key is a Cisco proprietary JSON Web Token(JWT) which is required in each HTTP request header to authenticate and authorize the user.
You can generate an API Key from the Detect and Locate, navigating to Notifications>API Keys and then click Add. Once the key is generated, ensure that it is stored safely. The API key expiration time is 90 days by default.
Note that the API key is visible only at creation time, and hence must be stored securely. The Detect and Locate does not save the API keys values. Each authenticated user can have up to ten keys, out of which only five can be active.
Below is an example from the POSTMAN client, where the API key has been used as an Authorization header.