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.
  • For examples of usage with different program languages, please take a look at 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
Stationshttps://its.accuware.com/api/v1/sites/{siteId}/stations/GET
Stationshttps://its.accuware.com/api/v1/sites/{siteId}/stations/{pMac}/GET, PUT, DELETE
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
Visual Fingerprintshttps://cvnav.accuware.com/api/v1/sites/{siteId}/levels/{levelId}/training/GET, DELETE
Visual Fingerprintshttps://cvnav.accuware.com/api/v1/sites/{siteId}/levels/{levelId}/training/{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}/stations/?loc=[yes|no]&lrrt=maxValue&areas=[yes|no]

GET

Retrieves the list of stations active (or previously active) within the selected site. Since the number of active stations might be large, it is possible to control the amount of returned data by setting the query parameters.

Resource-wide template parameters:

  • {siteId}: site identification string.

Query parameters:

  • loc [ yes | no ]: a flag that determines if the server will return location data in the response (default: loc=no).
  • lrrt (Last Report Relative Time): the maximum value for the lrrt field of the stations returned. The lrrt measures the seconds elapsed between the time the station was last seen active and the time the server was queried. (default: lrrt=600 which is equal to 10 minutes).
  • areas [ yes | no ]:  a flag that determines if the server will return the list of geo-fences in which the device is located (default: areas=no). This parameter requires the loc parameter to be equal to yes.

Available response representations:

  • 200 OK – application/json
  • JSON array of station descriptors

Example 1:

Retrieve the list of stations active within siteId=1001. If the query parameters are not specified, the default values will be used:

The result is a JSON object:

JSON fields:

  • mac: the pMAC (pseudo-MAC addresses). A unique ID generated by the Accuware Indoor Tracking engine (and visible inside the Accuware Indoors App or retrievable using a function of the Accuware Indoor SDK):
    • Indoors Tracking for Android: the pseudo MAC address contains a total of 12 characters beginning with a “N” (e.g. N4K2A58VSIF4)
    • Indoors Tracking for iOS: the pseudo MAC address contains a total of 12 characters beginning with a “U” (e.g. U6K2AI8VSIF4)
  • name: station’s name.
  • desc: station description.
  • lrrt (Last Report Relative Time): measures the seconds elapsed between the time the device was last seen active and the time the server was queried. For example, a value lrtt=4 means that the station was active four seconds before its location was queried.

Example 2:

Retrieve all the stations active in the last 15 seconds, and request location information in the response:

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

JSON fields:

  • mac: the pMAC (pseudo-MAC addresses). A unique ID generated by the Accuware Indoor Tracking engine (and visible inside the Accuware Indoors App or retrievable using a function of the Accuware Indoor SDK):
    • Indoors Tracking for Android: the pseudo MAC address contains a total of 12 characters beginning with a “N” (e.g. N4K2A58VSIF4)
    • Indoors Tracking for iOS: the pseudo MAC address contains a total of 12 characters beginning with a “U” (e.g. U6K2AI8VSIF4)
  • name: station’s name.
  • desc: station description.
  • loc:
    • lat/lng: a pair of latitude/longitude coordinates.
    • levelID: last level identification
    • source: “n3” – this location is computed by using the database of fingerprints available if an indoor fingerprinting has been performed.
    • precision: (not relevant)
  • lrrt (Last Report Relative Time): measures the seconds elapsed between the time the device was last seen active and the time the server was queried. For example, a value lrtt=4 means that the station was active four seconds before its location was queried.
  • areas: the list of geo-fences in which the device is located.

/api/v1/sites/{siteId}/stations/{pMac}/?areas=[yes|no]

GET

Retrieves information about a specific station. This is a READ-ONLY call typically issued by client applications that want to remotely track a device’s location.

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {pMac}: the pMAC (pseudo-MAC addresses). A unique ID generated by the Accuware Indoor Tracking engine (and visible inside the Accuware Indoors App or retrievable using a function of the Accuware Indoor SDK):
    • Indoors Tracking for Android: the pseudo MAC address contains a total of 12 characters beginning with a “N” (e.g. N4K2A58VSIF4)
    • Indoors Tracking for iOS: the pseudo MAC address contains a total of 12 characters beginning with a “U” (e.g. U6K2AI8VSIF4)

Query parameters:

  • areas [ yes | no ]:  a flag that determines if the server will return the list of geo-fences in which the device is located (default: areas=no).

Available response representations:

  • 200 OK – application/json
  • JSON representation of the station

Example:

Retrieve location about the station with MAC address 7072CF2148F0 from siteId=”1001″:

The result is a JSON Object. If the location of the station is available, it will be returned with the response. Additionally, if the station has been previously registered in the list of known stations, its name and description will be returned in the representation as well:

JSON fields:

  • mac: the pMAC (pseudo-MAC addresses). A unique ID generated by the Accuware Indoor Tracking engine (and visible inside the Accuware Indoors App or retrievable using a function of the Accuware Indoor SDK):
    • Indoors Tracking for Android: the pseudo MAC address contains a total of 12 characters beginning with a “N” (e.g. N4K2A58VSIF4)
    • Indoors Tracking for iOS: the pseudo MAC address contains a total of 12 characters beginning with a “U” (e.g. U6K2AI8VSIF4)
  • name: station’s name.
  • desc: station description.
  • loc:
    • lat/lng: a pair of latitude/longitude coordinates.
    • levelID: last level identification
    • source: “n3” – this location is computed by using the database of fingerprints available if an indoor fingerprinting has been performed.
    • precision: (not relevant)
  • lrrt (Last Report Relative Time): measures the seconds elapsed between the time the device was last seen active and the time the server was queried. For example, a value lrtt=4 means that the station was active four seconds before its location was queried.
  • areas: the list of geo-fences in which the device is located.

PUT

Registers a station in the list of known devices.

Resource-wide template parameters:

  • {siteId}: site identification string
  • {mac}: the pMAC (pseudo-MAC addresses). A unique ID generated by the Accuware Indoor Tracking engine (and visible inside the Accuware Indoors App or retrievable using a function of the Accuware Indoor SDK):
    • Indoors Tracking for Android: the pseudo MAC address contains a total of 12 characters beginning with a “N” (e.g. N4K2A58VSIF4)
    • Indoors Tracking for iOS: the pseudo MAC address contains a total of 12 characters beginning with a “U” (e.g. U6K2AI8VSIF4)

Accepted representations:

  • application/x-www-form-urlencoded

Station information:

  • The fields name and desc can contain empty values

Example:

Register a station with MAC address 0072CF173037 in siteId=”1001″:

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

DELETE

Removes a station from the list of known devices

Resource-wide template parameters:

  • {siteId}: site identification string
  • {pMac}: the pMAC (pseudo-MAC addresses). A unique ID generated by the Accuware Indoor Tracking engine (and visible inside the Accuware Indoors App or retrievable using a function of the Accuware Indoor SDK):
    • Indoors Tracking for Android: the pseudo MAC address contains a total of 12 characters beginning with a “N” (e.g. N4K2A58VSIF4)
    • Indoors Tracking for iOS: the pseudo MAC address contains a total of 12 characters beginning with a “U” (e.g. U6K2AI8VSIF4)

Accepted representations:

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

Example:

Remove the station with MAC address 0072CF173037 from siteId=”1001″

The result is a confirmation message:

/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 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: the pMAC (pseudo-MAC addresses) of the device that has been used to collect the fingerprint (during the fingerprinting process). A unique ID generated by the Accuware Indoor Tracking engine (and visible inside the Accuware Indoors App or retrievable using a function of the Accuware Indoor SDK):
    • Indoors Tracking for Android: the pseudo MAC address contains a total of 12 characters beginning with a “N” (e.g. N4K2A58VSIF4)
    • Indoors Tracking for iOS: the pseudo MAC address contains a total of 12 characters beginning with a “U” (e.g. U6K2AI8VSIF4)
  • 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}: fingerprint identifier.

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: the pMAC (pseudo-MAC addresses) of the device that has been used to collect the fingerprint (during the fingerprinting process). A unique ID generated by the Accuware Indoor Tracking engine (and visible inside the Accuware Indoors App or retrievable using a function of the Accuware Indoor SDK):
    • Indoors Tracking for Android: the pseudo MAC address contains a total of 12 characters beginning with a “N” (e.g. N4K2A58VSIF4)
    • Indoors Tracking for iOS: the pseudo MAC address contains a total of 12 characters beginning with a “U” (e.g. U6K2AI8VSIF4)
  • 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:

cvnav.accuware.com/api/v1/sites/{siteId}/levels/{levelId}/training/

GET

Resource-wide template parameters:

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

Available response representations:

  • 200 OK – application/json
  • JSON array of visual fingerprints

Example:

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

The result is a JSON array like the one below:

JSON fields:

  • siteid: identifier of the site.
  • levelID: identifier of the level.
  • id: identifier of the visual fingerprint.
  • lat and lng: coordinates of the visual fingerprint (these are the coordinates of the station when the visual fingerprint has been collected by the Accuware Indoor App).
  • roc: not used.

DELETE

Delete ALL the visual 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 visual fingerprint from site 1001 and level 0:

The result is a JSON object:

cvnav.accuware.com/api/v1/sites/{siteId}/levels/{levelId}/training/{fingerprintId}/

GET

Resource-wide template parameters:

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

Available response representations:

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

 

Example:

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

The result is a JSON array like the one below:

JSON fields:

  • siteid: identifier of the site.
  • levelID: identifier of the level.
  • id: identifier of the visual fingerprint.
  • lat and lng: coordinates of the visual fingerprint (these are the coordinates of the station when the visual fingerprint has been collected by the Accuware Indoor App).
  • roc: not used.

DELETE

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

Resource-wide template parameters:

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

Accepted representations:

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

Example:

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

The result is a JSON object: