Accuware provides the Indoor Navigation RESTful web API that can be used to access and manipulate the state of set of resources registered with a site. The available resources that can be manipulated using the Indoors API are:
The API is accessed using URIs that point to the resource to be manipulated.
Operations on resources are controlled by using one of the following HTTPS methods:
- GET: Retrieves the representation of a resource (JSON format).
- PUT: Creates or modifies a resource.
- DELETE: Removes a resource.
Performances of the API
The Accuware Indoors server supports HTTPS data compression allowing thus a better use of available bandwidth between your client and our server and providing in the end greater transmission speeds between both.
In order to make use of the compression you have to include the following supported compression schema in the header of the HTTPS request:
"Accept-Encoding: gzip, deflate"
More information in this page.
Accessing the API
cURL (command line)
The easiest way to access the API is via the command line tool cURL freely available at https://curl.haxx.se/. cURL is a command line tool for transferring data with URL syntax. To install and use cURL:
- Download cURL at this URL: https://curl.haxx.se/download.
- Unzip cURL in a folder on your PC (e.g. C:\curl).
- Open a shell/command line and go in the cURL folder (e.g. C:\curl).
Using cURL, it is possible to supply user credentials necessary to access a resource:
curl -u username:password https://its.accuware.com/api/v1/sites/1001/stations/0072CF2148F0/
By default, the HTTP method GET is invoked on the resource. Other methods can be called with the –X option:
curl -u username:password -X PUT https://its.accuware.com/api/v1/. curl -u username:password -X DELETE https://its.accuware.com/api/v1/.
Resources are accessed in the context of a particular site. Sites are identified by short alphanumeric strings (the SiteId) assigned by Accuware during the creation of each site. The SiteID can be found inside the Accuware Activation email and inside the Accuware dashboard under General > Sites.
Each site can be made of one or multiple levels identified by a numeric IDs (the LevelId) that can be a positive or negative integer. By default, each site contains a default level (LevelId = 0) that can’t be eliminated. Using the Accuware dashboard it is possible to create up to 30 Levels (from Level -10 to level +20) plus Level 0. Additional levels can be created using this PUT API call. Levels can be used to divide:
- different physical floors of a multi-story building (e.g. a LevelId for each floor of a shopping mall)
- or different areas (at the same altitude) of one or multiple buildings (e.g. a LevelId for each store of a retail chain).
Floor plans provide reference points inside a building, such as the location of walls, rooms, hallways, elevators, staircases, atriums, windows, doors etc… Each floorplan is identified by an alphanumeric strings (the fpId) assigned by the Accuware server during the upload of the floor plan image through the Accuware dashboard. Even if it is possible to assign more than one floor plan to each level we strongly suggest to add one and only one floor plan to each level.
Access to the resources is restricted to registered users on a per-site basis. Each account is identified by an username (an email address) and a password. Accuware Wi-Fi Location Monitor defines three possible access levels for each user account registered with a site:
- Read-Only (access = 10)
- Read-Write (access = 20)
- Full Control (access = 30)
Users with Read-Only access are not allowed to make changes to the site, while users with Read-Write access can modify data regarding nodes and station. Full control access is required to create and delete user accounts within a specific site.
A fingerprint is a collection of radio signal identifiers and their corresponding Received Signal Strength (RSS) detected at specific, known physical location (identified by latitude, longitude and level) of a specific site. Each fingerprint is identified by an integer, positive and progressive ID (the fingerprintID). Inside each fingerprints, the radio signal indentifiers can be of two types:
- Wi-Fi access points – identified by the MAC address of their network interface
- iBeacons – identified by the pMAC (pseudo MAC address) which is a unique ID generated by the Accuware Indoor Tracking engine using the UUID, Major and Minor of the iBeacon.