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”:

curl -u username:password https://its.accuware.com/api/v1/sites/

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

[
{
    "desc": "EXP. JUN 8th - DEVELOPMENT",
    "siteId": "1001",
    "address": "1.899079,4.80904",
    "name": "Site A",
    "access": "30"
},
{
    "desc": "OPEN ENDED - PRODUCTION",
    "siteId": "1002",
    "address": "43.857165,-79.460979",
    "name": "Site B",
    "access": "30"
}
]

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″:

curl -u username:password https://its.accuware.com/api/v1/sites/1001/

The result is a JSON object:

{
    "desc": "EXP. JUN 8th - DEVELOPMENT",
    "siteId": "1001",
    "address": "1.899079,4.80904",
    "name": "Site A",
    "access": "30"
}

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″:

curl -u username:password https://its.accuware.com/api/v1/sites/1001/levels/

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

[
   {
      "desc":"",
      "levelId":1,
      "alt":"NaN",
      "name":"First Floor"
   },
   {
      "desc":"",
      "levelId":2,
      "alt":"NaN",
      "name":"Second Floor"
   },
   {
      "desc":"",
      "levelId":3,
      "alt":"NaN",
      "name":"Penthouse"
   }
]

/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″:

curl -u username:password https://its.accuware.com/api/v1/sites/1001/levels/1/

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

{
   "desc":"",
   "levelId":1,
   "alt":"NaN",
   "name":"First Floor"
}

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″:

curl -u username:password -X PUT -d "name=Level_11&desc=This is a new level" https://its.accuware.com/api/v1/sites/1001/levels/11/

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

{
 "desc": "This is a new level",
 "levelId": 11,
 "alt": "NaN",
 "name": "Level_11"
}

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:

curl -u username:password -X DELETE https://its.accuware.com/api/v1/sites/1001/levels/11/

The result is a confirmation message:

{
    "status": "success"
}

/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″:

curl -u username:password https://its.accuware.com/api/v1/sites/1001/floorplans/

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

[
{
   "desc":"",
   "levelId":0,
   "kmlAligned":"https://s3.amazonaws.com/navizon.its.fp/1001/aaa1111_a.kml",
   "name":"First - Floor",
   "kml":"https://s3.amazonaws.com/navizon.its.fp/1001/aaa1111_o.kml",
   "access":"private",
   "fpId":"aaa1111"
},
{
   "desc":"",
   "levelId":1,
   "kmlAligned":"https://s3.amazonaws.com/navizon.its.fp/1001/aaa2222_a.kml",
   "name":"Second - Floor",
   "kml":"https://s3.amazonaws.com/navizon.its.fp/1001/aaa2222_o.kml",
   "access":"private",
   "fpId":"aaa2222"
}
]

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″:

curl --form username=its_username --form password=its_password --form levelId=4 --form name=Fourth Floor --form desc=Description --form kml=@Floorplan4.kml --form image=@Floor4.png -X POST https://its.accuware.com/api/v1/sites/1001/floorplans/

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

​{"levelId":4,"fpId":"aatkhtv2n0","name":"Fourth Floor","access":"private","kml":"https://s3.amazonaws.com/navizon.its.fp/1001/aatkhtv2n0_o.kml","desc":"Description","kmlAligned":"https://s3.amazonaws.com/navizon.its.fp/1001/aatkhtv2n0_a.kml"}

/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”:

curl -u username:password https://its.accuware.com/api/v1/sites/1001/floorplans/aaa1111/

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

{
   "desc":"",
   "levelId":0,
   "kmlAligned":"https://s3.amazonaws.com/navizon.its.fp/1001/aaa1111_a.kml",
   "name":"First - Floor",
   "kml":"https://s3.amazonaws.com/navizon.its.fp/1001/aaa1111_o.kml",
   "access":"private",
   "fpId":"aaa1111"
}

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″:

curl -u username:password https://its.accuware.com/api/v1/sites/1001/accounts/

The result is a JSON Object:

[
   {
      "username":"carlos@domain.net",
      "access":10
   },
   {
      "username":"cyril@domain.net",
      "access":20
   },
   {
      "username":"gianni@domain.net",
      "access":30
   },
   {
      "username":"francesco@domain.net",
      "access":30
   }
]

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:

curl -u username:password https://its.accuware.com/api/v1/sites/1001/levels/0/fingerprints/?format=KML > fingerprints.kml

The result is a KML file like the one below:

<?xml version="1.0" encoding="UTF-8"?>
<kml 
    xmlns="http://earth.google.com/kml/2.1">
    <Folder>
        <name>Fingerprints</name>
        <Placemark>
            <name>0</name>
            <Point>
                <coordinates>9.460677,45.649042</coordinates>
            </Point>
            <description>rel time=0.0 sec
--------------
6CB0CEB242A4: -53
</description>
        </Placemark>
        <Placemark>
            <name>1</name>
            <Point>
                <coordinates>9.460707,45.649051</coordinates>
            </Point>
            <description>rel time=5.6 sec
--------------
3039F2F1AD0B: -91
6CB0CEB242A4: -43
</description>
        </Placemark>
        <Placemark>
            <name>2</name>
            <Point>
                <coordinates>9.460723,45.649033</coordinates>
            </Point>
            <description>rel time=11.2 sec
--------------
3039F2F1AD0B: -91
6CB0CEB242A4: -61
</description>
        </Placemark>
        <Placemark>
            <name>3</name>
            <Point>
                <coordinates>9.460711,45.649052</coordinates>
            </Point>
            <description>rel time=25.2 sec
--------------
6CB0CEB242A4: -71
</description>
        </Placemark>
        <Placemark>
            <name>4</name>
            <Point>
                <coordinates>9.460676,45.649043</coordinates>
            </Point>
            <description>rel time=30.8 sec
--------------
6CB0CEB242A4: -37
</description>
        </Placemark>
    </Folder>
</kml>

Example:

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

curl -u username:password https://its.accuware.com/api/v1/sites/1001/levels/0/fingerprints/

The result is a JSON array like the one below:

[
    {
        "id": 0,
        "station": "N2F4IHV9R5RI",
        "time": 1464612750774,
        "type": "client_scan_wifi",
        "lat": 45.649042,
        "lng": 9.460677,
        "entries": [
            {
                "ap": "6CB0CEB242A4",
                "rss": -53
            }
        ]
    },
    {
        "id": 1,
        "station": "N2F4IHV9R5RI",
        "time": 1464612756377,
        "type": "client_scan_wifi",
        "lat": 45.649051,
        "lng": 9.460707,
        "entries": [
            {
                "ap": "6CB0CEB242A4",
                "rss": -43
            },
            {
                "ap": "3039F2F1AD0B",
                "rss": -91
            }
        ]
    },
    {
        "id": 2,
        "station": "N2F4IHV9R5RI",
        "time": 1464612761967,
        "type": "client_scan_wifi",
        "lat": 45.649033,
        "lng": 9.460723,
        "entries": [
            {
                "ap": "6CB0CEB242A4",
                "rss": -61
            },
            {
                "ap": "3039F2F1AD0B",
                "rss": -91
            }
        ]
    },
    {
        "id": 3,
        "station": "N2F4IHV9R5RI",
        "time": 1464612776010,
        "type": "client_scan_wifi",
        "lat": 45.649052,
        "lng": 9.460711,
        "entries": [
            {
                "ap": "6CB0CEB242A4",
                "rss": -71
            }
        ]
    },
    {
        "id": 4,
        "station": "N2F4IHV9R5RI",
        "time": 1464612781618,
        "type": "client_scan_wifi",
        "lat": 45.649043,
        "lng": 9.460676,
        "entries": [
            {
                "ap": "6CB0CEB242A4",
                "rss": -37
            }
        ]
    }
]

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:

curl -u username:password -X DELETE https://its.accuware.com/api/v1/sites/1001/levels/0/fingerprints/

The result is a JSON object:

{
  "status": "success"
}

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:

curl -u username:password https://its.accuware.com/api/v1/sites/1001/levels/0/fingerprints/0/?format=KML

The result is a KML file like the one below:

<?xml version="1.0" encoding="UTF-8"?>
<kml 
    xmlns="http://earth.google.com/kml/2.1">
    <Folder>
        <name>Fingerprints</name>
        <Placemark>
            <name>0</name>
            <Point>
                <coordinates>9.460677,45.649042</coordinates>
            </Point>
            <description>rel time=0.0 sec
--------------
6CB0CEB242A4: -53
</description>
        </Placemark>
    </Folder>
</kml>

Example:

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

curl -u username:password https://its.accuware.com/api/v1/sites/1001/levels/0/fingerprints/0/

The result is a JSON array like the one below:

[
    {
        "id": 0,
        "station": "N2F4IHV9R5RI",
        "time": 1464612750774,
        "type": "client_scan_wifi",
        "lat": 45.649042,
        "lng": 9.460677,
        "entries": [
            {
                "ap": "6CB0CEB242A4",
                "rss": -53
            }
        ]
    }
]

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:

curl -u username:password -X DELETE https://its.accuware.com/api/v1/sites/1001/levels/0/fingerprints/44/

The result is a JSON object:

{
  "status": "success"
}