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://qa-dnaspaces.io/api/location/v2/devices' \
--header 'Authorization: Bearer {BEARER_TOKEN}' \
--data-raw ''

Sample Response:

{
    "success": true,
    "querystring": {},
    "morePage": false,
    "results": [
        {
          "tenantId": "200",
          "macAddress": "00:12:b8:0a:c6:20",
          "deviceType": "TAG",
          "campusId": "5cb06b3ba1d943669963417c4330c6c7",
          "buildingId": "98c86b09665a4ffab9647709d966f3a6",
          "floorId": "3b3aad61352e4bc09cdea0119ee3d9f3",
          "lhfloorId": "3b3aad61352e4bc09cdea0119ee3d9f3",
          "hierarchy": "San Jose->SJC-17->1st Floor",
          "locationHierarchy": "root-node->San Jose->SJC-17->1st Floor",
          "hierarchyIds": [
            "0c872fbb-0545-45fd-b7e2-6ce6ff6f08af",
            "2d3da06b-f4f2-4b3e-9e56-492665ae78ac"
          ],
          "source": "NOTIFICATION",
          "isMacHashed": false,
          "deviceId": "00:24:b1:02:e7:10",
          "coordinates": [
            33.401928,
            101.87378
          ],
          "geoCoordinates": [
            49.26188380661546,
            -123.24809010788138
          ],
          "confidenceFactor": 120,
          "computeType": "RSSI",
          "firstLocatedAt": "2018-05-25T17:30:12.403Z",
          "lastLocatedAt": "2018-05-27T21:14:44.005Z",
          "changedOn": "1527456440322",
          "associated": false,
          "manufacturer": "Aeroscout Ltd.",
          "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"
              ]
            }
          ]
        }
    ]
}

You can use Cisco DNA Spaces Location Cloud API to retrieve, add or modify information in the Detect and Locate App in DNASpaces Dashboard. The Cisco DNA 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.
  • Active devices location API - API to retrieve devices, devices count and floors data.

Navigating the Detect and Locate GUI

Once the key is generated, ensure that it is stored safely. The API key expiration time is 90 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.

Do not forget to save the API Key

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.

POSTMAN Client