Accuware Indoor exposes a RESTful web API that can be used to access and manipulate the state of set of resources registered with a site. The list of resources and the supported methods is summarized in the following table along with examples of usages with cURL.

  • An introduction to the API and an explanation about all the available resources can be found in this page
ResourceURIAvailable HTTPS Methods
Siteshttps://its.accuware.com/api/v1/sites/GET
Siteshttps://its.accuware.com/api/v1/sites/{siteId}/GET
Levelshttps://its.accuware.com/api/v1/sites/{siteId}/levels/GET
Levelshttps://its.accuware.com/api/v1/sites/{siteId}/levels/{levelId}/GET, PUT, DELETE
Floor planshttps://its.accuware.com/api/v1/sites/{siteId}/floorplans/GET, POST
Floor planshttps://its.accuware.com/api/v1/sites/{siteId}/floorplans/{fpId}/GET
User Accountshttps://its.accuware.com/api/v1/sites/{siteId}/accounts/GET
Radio Fingerprintshttps://its.accuware.com/api/v1/sites/{siteId}/levels/{levelId}/fingerprints/GET, DELETE
Radio Fingerprintshttps://its.accuware.com/api/v1/sites/{siteId}/levels/{levelId}/fingerprints/{fingerprintId}/GET, DELETE

/api/v1/sites/

GET

Retrieves the list of sites registered with an user account

Available response representations:

  • 200 OK – application/json.
  • JSON array of site descriptors.

Example:

Query the list of sites registered with the account “username”:

The result is an array [{…}, {…}, …] of JSON objects:

JSON fields:

  • desc: expiration day of your site along with the type of account.
  • siteId: site identification.
  • address: used to point to the map on the area of interest in to the Accuware dashboard.
  • name: site name.
  • access: access levels for each account registered

/api/v1/sites/{siteId}/

GET

Retrieves information about a specific site

Resource-wide template parameters:

  • {siteId}: site identification string.

Available response representations:

  • 200 OK – application/json.
  • JSON representation of the site.

Example:

Retrieve information about the site with siteId=”1001″:

The result is a JSON object:

JSON fields:

  • desc: expiration day of your site along with the type of account.
  • siteId: site identification.
  • address: used to point to the map on the area of interest in to the Accuware dashboard.
  • name: site name.
  • access: access levels for each account registered

/api/v1/sites/{siteId}/levels/

GET

Returns all the levels for the current site

Resource-wide template parameters:

  • {siteId}: site identification string.

Available response representations:

  • 200 OK – application/json
  • JSON array of levels associated to a site.

Example:

Returns a JSON representation of all the levels for site  with siteId=”1001″:

The result is an array [{…}, {…}, …] of JSON objects:

/api/v1/sites/{siteId}/levels/{levelId}/

GET

Returns a specific level for the current site

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {levelId}: level identification string.

Available response representations:

  • 200 OK – application/json.
  • JSON representation of a level.

Example:

Returns a JSON representation of the level “1” for site with siteId=”1001″:

The result is an array [{…}, {…}, …] of JSON objects:

PUT

Create a new level for the site.

Resource-wide template parameters:

  • {siteId}: site identification string
  • {levelId}: level identification string.

Accepted representations:

  • application/x-www-form-urlencoded

Level information:

  • The fields name, desc and alt can contain empty values

Example:

Create level with LevelID 11 in siteId 1001″:

The result is a JSON that describes the level just registered:

DELETE

Remove a level from the selected site

Resource-wide template parameters:

  • {siteId}: site identification string
  • {levelId}: level identification string

Accepted representations:

  • none
  • No information is passed along with the request

Example:

Remove the level with levelID 11 from siteId 1001:

The result is a confirmation message:

/api/v1/sites/{siteId}/floorplans/

GET

Returns all the floor plans for the current site

Resource-wide template parameters:

  • {siteId}: site identification string.

Available response representations:

  • 200 OK – application/json
  • JSON array of floor plans.

Example:

Returns a JSON representation of all the levels for site  with siteId=”1001″:

The result is an array [{…}, {…}, …] of JSON objects:

JSON fields:

  • desc:floor plan’s description.
  • levelID: level associated to the floor plan.
  • kmlAligned: link to the transformed KML file.
  • name: floor plan’s name.
  • kml: link to the original KML file.
  • access: private (not relevant)
  • fpID: floor plan identification string.

 

POST

Upload a floor plan in the current site.

Resource-wide template parameters:

  • {siteId}: site identification string

Accepted representations:

  • form-data

Example:

Upload the floor plan of the Fourth Floor on the level 4 in the site with siteId=”1001″:

At the end of the upload process, you should display:

/api/v1/sites/{siteId}/floorplans/{fpId}/

GET

Returns a specific floor plan for the current site

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {fpId}: floor plan identification string.

Available response representations:

  • 200 OK – application/json
  • JSON representation of a floor plan

Example:

Returns a JSON representation of the floor plan “aaa1111″ for site with siteId=”1001”:

The result is an array [{…}, {…}, …] of JSON objects:

JSON fields:

  • desc:floor plan’s description.
  • levelID: level associated to the floor plan.
  • kmlAligned: link to the transformed KML file.
  • name: floor plan’s name.
  • kml: link to the original KML file.
  • access: private (not relevant)
  • fpID: floor plan identification string.

/api/v1/sites/{siteId}/accounts/

GET

Retrieves all the user accounts associated to a site

Resource-wide template parameters:

  • {siteId}: site identification string.

Available response representations:

  • 200 OK – application/json.
  • JSON representation of user accounts associated to a site.

Example:

Retrieves a JSON representation of all the user accounts associated with siteId=”1001″:

The result is a JSON Object:

JSON fields:

  • username: username associated with the site.
  • access: access levels for the username registered.

api/v1/sites/{siteId}/levels/{levelId}/fingerprints/?format=KML

GET

Resource-wide template parameters:

  • {siteId}: site identification string
  • {levelId}: level identification string.

Query parameters:

  • (optional) format: format=KML will download a file with the data.

Available response representations:

  • 200 OK – application/json
  • JSON or KML array of fingerprints

Example:

Download the KML of all the fingerprints for site 1001 and level 0:

The result is a KML file like the one below:

Example:

Download the JSON of all the fingerprints for site 1001 and level 0:

The result is a JSON array like the one below:

JSON fields:

  • id: identifier of the fingerprint
  • station: pMac of the device that has been used to collect the fingerprint (during the fingerprinting process)
  • type: not relevant.
  • lat and lng: coordinates of the fingerprint (these are the coordinates of the station when the fingerprint has been collected by the Accuware Indoor App)
  • entries:
    • ap: 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.
    • rss: receives signal strength.

DELETE

Delete ALL fingerprints from a specific level of a specific site.

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {levelId}: level identification string.

Accepted representations:

  • none.
  • No information is passed along with the request.

Example:

Delete ALL the fingerprint from site 1001 and level 0:

The result is a JSON object:

api/v1/sites/{siteId}/levels/{levelId}/fingerprints/{fingerprintId}/

GET

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {levelId}: level identification string.
  • {fingerprintId}: level identification string.

Query parameters:

  • (optional) format: format=KML will download a file with the data.

Available response representations:

  • 200 OK – application/json
  • JSON or KML with the chosen fingerprint

Example:

Download the KML of the fingeprint with ID 0 collected inside site 1001 and level 0:

The result is a KML file like the one below:

Example:

Download the JSON of the fingeprint with ID 0 collected inside site 1001 and level 0:

The result is a JSON array like the one below:

JSON fields:

  • id: identifier of the fingerprint
  • station: pMac of the device that has been used to collect the fingerprint (during the fingerprinting process)
  • type: not relevant.
  • lat and lng: coordinates of the fingerprint (these are the coordinates of the station when the fingerprint has been collected by the Accuware Indoor App)
  • entries:
    • ap: 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.
    • rss: receives signal strength.

DELETE

Delete specific fingerprints from a specific level of a specific site.

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {levelId}: level identification string.
  • {fingerprintId}: fingerprint identifier.

Accepted representations:

  • none.
  • No information is passed along with the request.

Example:

Delete the fingerprint with fingerprintId 44 from site 1001 and level 0:

The result is a JSON object: