Accuware Wearabouts 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 Wearabouts API and an explanation about all the available resources can be found in this page.
  • For examples of usage of the Wearabouts API 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
Deviceshttps://navimote2.navizon.com/api/v1/sites/{siteID}/devices/GET, DELETE
Deviceshttps://navimote2.navizon.com/api/v1/sites/{siteID}/devices/{deviceID}/GET, PUT, DELETE
Devices - Statushttps://navimote2.navizon.com/api/v1/sites/{siteID}/devices/{deviceID}/status/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

HTTP Request Path Parameter:

  • {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

HTTP Request Path Parameter:

  • {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

HTTP Request Path Parameter:

  • {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.

HTTP Request Path Parameter:

  • {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

HTTP Request Path Parameter:

  • {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

HTTP Request Path Parameter:

  • {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.

HTTP Request Path Parameter:

  • {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

HTTP Request Path Parameter:

  • {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}/devices/?with=udo,status,config

GET

Retrieves several information about all the devices (Android, iOS and Smart Tags) registered within a site. Additional information can be obtained by varying query string parameters.

HTTP Request Header:

  • Content-Type: application/json

HTTP Request Path Parameter:

  • {siteId}: site identification string.

HTTP Query String Parameter:

  • udo: get back the user defined objects (see JSON below)
  • status: get back the status objects (see JSON below)
  • config: get back ONLY the list of devices with a device-specific configuration (do not use it in conjunction with udo and/or status)

Available response representations:

  • 200: Array of Device List Object
  • 400: Error Object
  • 401: “Not authenticated”

Example:

Retrieve the user defined objects and the status objects of all the devices registered within site 1001:

The result is a JSON like this one:

JSON fields:

  • mac: deprecated – use deviceId!
  • deviceId: 
    • Wearabouts App for Android: the pseudo MAC address is assigned by the Wearabouts App running on the device and contains a total of 12 characters beginning with a “W”.
    • Wearabouts App for iOS: the pseudo MAC address is assigned by the Wearabouts App running on the device and contains a total of 12 characters beginning with a “X”.
    • Accuware Smart Tags: the MAC address is printed on a label on the back of the Accuware Smart Tag and begins with 54FB58.
  • device status:
    • battery: estimated battery percentage. Value with minus (-) means that the battery is charging.
    • device_events:
      • panic (only for Smart Tags): timestamp of the last button press.
      • moving: timestamp of the last movement.
      • pwr_up (only for Smart Tags): timestamp of the last activation of the Smart Tag.
    • fw_version: firmware version.
    • received_at: timestamp of the last status.
    • type_of_device: the device capabilities are wifi (Smart Tag), or wifi,gsm,gps (for Android devices).
    • gps_timestamp (only for Android devices): timestamp of the last location computed by the Android location manager.
    • gps_latitude (only for Android devices): latitude of the last location computed by the Android location manager.
    • gps_longitude (only for Android devices): longitude of the last location computed by the Android location manager.
  • position:
    • siteID: site identification.
    • levelID: last level identification.
    • source: source location type:
      • INDOORS/N3 – this location is computed by using the database of fingerprints available if an indoor fingerprinting has been performed.
      • N1 – this location is computed by using the Navizon global database of Wi-Fi APs and Cell-IDs throughout the world. More information available here.
      • Core – this location is provided by the Android or iOS location manager.
    • device: see above.
    • deviceID: see above.
    • fixed_at: last location fix.
    • lat: latitude.
    • lng: longitude.
    • precision: an estimated radius of confidence where the device can be found.
  • device_type:
    • NZ002.2 for the Smart Tags.
    • NWA1 for Android devices.
    • NWA2 for iOS devices.
  • udo:
    • name: device name assigned using the Accuware dashboard.
    • desc: device description assigned using the Accuware dashboard.
    • type: not relevant.
  • current_server_time: server timestamp when the query was made.

Timestamps: the timestamps are UTC Unix epoch timestamps in seconds. The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z). You can find an Epoch & Unix Timestamp Conversion Tool at this link

DELETE

Remove ALL the devices associated with a specific site (this is not reversible)

HTTP Request Path Parameter:

  • {siteId}: site identification string

Accepted representations:

  • none
  • No information is passed along with the request

Example:

Remove all the devices associates with siteId 1001:

The result is a confirmation message:

/api/v1/sites/{siteID}/devices/{deviceID}/

GET

Retrieves the user defined object about a specific device (Android, iOS and Smart Tags) registered within a site

HTTP Request Path Parameter:

  • {siteId}: site identification string.
  • {deviceId}:
    • Wearabouts App for Android: the pseudo MAC address is assigned by the Wearabouts App running on the device and contains a total of 12 characters beginning with a “W”.
    • Wearabouts App for iOS: the pseudo MAC address is assigned by the Wearabouts App running on the device and contains a total of 12 characters beginning with a “X”.
    • Accuware Smart Tags: the MAC address is printed on a label on the back of the Accuware Smart Tag and begins with 54FB58.

Available response representations:

  • 200 OK – application/json.
  • JSON representation of the user defined object.

Example:

Retrieve the user defined object of device 001122334455 registered within site 1001:

The result is a JSON like this one:

JSON fields:

  • name: device name assigned using the Accuware dashboard
  • desc: device description assigned using the Accuware dashboard

PUT

Associates a device (represented by it’s MAC address) with a site. This is currently a one-to-one relation, i.e. if the given device is already associated with another site, an error is given.

HTTP Request Path Parameter:

  • {siteId}: site identification string.
  • {deviceId}:
    • Wearabouts App for Android: the pseudo MAC address is assigned by the Wearabouts App running on the device and contains a total of 12 characters beginning with a “W”.
    • Wearabouts App for iOS: the pseudo MAC address is assigned by the Wearabouts App running on the device and contains a total of 12 characters beginning with a “X”.
    • Accuware Smart Tags: the MAC address is printed on a label on the back of the Accuware Smart Tag and begins with 54FB58.

Accepted representations:

  • JSON with the user defined information (e.g. name, desc, type..)

Example:

Associate device 001122334455 with siteId 1001:

The result is a confirmation message:

DELETE

Remove a devices associated with a specific site (this is not reversible)

HTTP Request Path Parameter:

  • {siteId}: site identification string
  • {deviceId}:
    • Wearabouts App for Android: the pseudo MAC address is assigned by the Wearabouts App running on the device and contains a total of 12 characters beginning with a “W”.
    • Wearabouts App for iOS: the pseudo MAC address is assigned by the Wearabouts App running on the device and contains a total of 12 characters beginning with a “X”.
    • Accuware Smart Tags: the MAC address is printed on a label on the back of the Accuware Smart Tag and begins with 54FB58

Accepted representations:

  • none (no information is passed along with the request)

Example:

Remove device 001122334455 associates with siteId 1001:

The result is a confirmation message:

/api/v1/sites/{siteID}/devices/{deviceID}/status/

GET

Retrieves status information about one device (Android, iOS and Smart Tags) registered within a site

HTTP Request Path Parameter:

  • {siteId}: site identification string.
  • {deviceId}:
    • Wearabouts App for Android: the pseudo MAC address is assigned by the Wearabouts App running on the device and contains a total of 12 characters beginning with a “W”.
    • Wearabouts App for iOS: the pseudo MAC address is assigned by the Wearabouts App running on the device and contains a total of 12 characters beginning with a “X”.
    • Accuware Smart Tags: the MAC address is printed on a label on the back of the Accuware Smart Tag and begins with 54FB58.

Available response representations:

  • 200 OK – application/json
  • JSON representation of the devices’ status

Example:

Retrieve the status of a device with pMAC W2F4IHV9R5RA registered within site 1001

The result is a JSON Object. If the status is available, it will be returned with the response:

JSON fields:

  • current_server_time: server time stamp when the query was made.
  • device status:
    • battery: estimated battery percentage. Value with minus (-) means that the battery is charging.
    • device_events:
      • panic (only for Smart Tags): time stamp of the last button press.
      • moving: time stamp of the last movement.
      • pwr_up (only for Smart Tags): time stamp of the last activation of the Smart Tag.
    • fw_version: firmware version.
    • received_at: timestamp of the last status.
    • type_of_device: the device capabilities are wifi (Smart Tag), or wifi,gsm,gps (for Android devices).
    • gps_timestamp (only for Android devices): timestamp of the last location computed by the Android location manager.
    • gps_latitude (only for Android devices): latitude of the last location computed by the Android location manager.
    • gps_longitude (only for Android devices): longitude of the last location computed by the Android location manager.
  • its_status: not relevant.
  • n1_status: not relevant.
  • position:
    • siteID: site identification.
    • levelID: last level identification.
    • source: source location type:
      • INDOORS/N3 – this location is computed by using the database of fingerprints available if an indoor fingerprinting has been performed.
      • N1 – this location is computed by using the Navizon global database of Wi-Fi APs and Cell-IDs throughout the world. More information available here.
      • Core – this location is provided by the Android or iOS location manager.
    • device: the pMAC of the device.
    • deviceId: the pMAC of the device.
    • fixed_at: last location fix.
    • lat: latitude.
    • lng: longitude.
    • precision: an estimated radius of confidence where the device can be found.
  • device_type:
    • NZ002.2 for the Smart Tags.
    • NWA1 for Android devices.
    • NWA2 for iOS devices.

Timestamps: the timestamps are UTC Unix epoch timestamps in seconds. The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z). You can find an Epoch & Unix Timestamp Conversion Tool at this link

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

GET

Retrieves all the user accounts associated to a site

HTTP Request Path Parameter:

  • {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

Retrieve all the fingerprints from a specific level of a specific site.

HTTP Request Path Parameter:

  • {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.

HTTP Request Path Parameter:

  • {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

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

HTTP Request Path Parameter:

  • {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 a specific fingerprints from a specific level of a specific site.

HTTP Request Path Parameter:

  • {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: