Getting Started
Base URL: dnaspaces.io/api/location/v1
Authentication: In addition to the path URL, an Authorization header must be added to every API request. Add a request header Authorization
with value Bearer {BEARER_TOKEN}
.
Sample Request:
curl --location --request GET 'https://dev-dnaspaces.io/api/location/v1/clients' \
--header 'Authorization: Bearer {BEARER_TOKEN}' \
--data-raw ''
Sample Response:
{
"results": [
{
"tenantId": "200",
"macAddress": "00:12:b8:0a:c6:20",
"deviceType": "TAG",
"campusId": "5cb06b3ba1d943669963417c4330c6c7",
"buildingId": "98c86b09665a4ffab9647709d966f3a6",
"floorId": "3b3aad61352e4bc09cdea0119ee3d9f3",
"coordinates": [
33.401928,
101.87378
],
"rawCoordinates": [
33.401928,
101.87378
],
"confidenceFactor": 120,
"computeType": "RSSI",
"firstLocatedAt": "2018-05-25T17:30:12.403Z",
"lastLocationAt": "2018-05-27T21:14:44.005Z",
"changedOn": "1527456440322",
"associated": false,
"manufacturer": "Aeroscout Ltd.",
"controller": "10.22.244.27",
"maxDetectedRssi": {
"apMacAddress": "f0:7f:06:35:8d:00",
"band": "IEEE_802_11_B",
"slot": 2,
"rssi": -81,
"antennaIndex": 0,
"lastHeard": 1
},
"numDetectingAps": 3,
"apList": [
{
"apMacAddress": "3c:08:f6:fb:29:50",
"bands": [
"IEEE_802_11_A"
]
}
]
}
],
"querystring": {
"tenantId": "200"
},
"success": true,
"morePage": false
}
You can use Cisco Spaces Location Cloud API to retrieve, add or modify information in the Detect and Locate App in Cisco Spaces Dashboard. The Cisco Spaces Location Cloud API are as follows:
- Active clients’ location API – API to retrieve clients count and location data.
- Clients location history API – API to get the devices MAC address list and the details for a given device.
- Notifications API - API to create WEBHOOKs for notifications.
- Map API – API to upload, navigate the maps hierarchy, retrieve and delete map element etc.
- Access points API – API to get access points count and list.
Once the key is generated, ensure that it is stored safely. The API key expiration time can be chosen for any period from 7 to 365 days.
Note: that the API key is visible only at creation time, and hence must be stored securely. The Detect and Locate App 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.