Accuware Wi-Fi Location Monitor exposes a RESTful web API that can be used to access and manipulate the state of set of resources registered with a site. An introduction to the API and an explanation about all the available resources can be found in this pageThe list of resources and the supported methods is summarized in the following tables along with examples of usages with cURL.

PLEASE READ – European GDPR: in order to comply with the EU GDPR that regulates the collection and storing of personal data​ inside the European Union, starting from May ​25, 2018 , all the MAC addresses detected by Accuware WiFi Location Monitor (made available through the API​ and the CSV daily reports)​ will ​be converted by default into anonymous IDs using a one-way ​hashingMore information at this link.

Synchronous Access

ResourceURIAvailable HTTPS Methods
Siteshttps://its.accuware.com/api/v1/sites/GET
Siteshttps://its.accuware.com/api/v1/sites/{siteId}/GET
Nodeshttps://its.accuware.com/api/v1/sites/{siteId}/nodes/GET
Nodeshttps://its.accuware.com/api/v1/sites/{siteId}/nodes/{mac}/GET, PUT, DELETE
Stationshttps://its.accuware.com/api/v1/sites/{siteId}/stations/GET
Stationshttps://its.accuware.com/api/v1/sites/{siteId}/stations/{mac}/GET, PUT, DELETE
User Accountshttps://its.accuware.com/api/v1/sites/{siteId}/accounts/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
Analyticshttps://analytics.navizon.com/api/v1/sites/{siteId}/GET
Geo-fenceshttps://its.accuware.com/api/v1/sites/{siteId}/levels/{levelId}/metadata/GET
Geo-fenceshttps://its.accuware.com/api/v1/sites/{siteId}/metadata/POST, DELETE
Geo-fenceshttps://its.accuware.com/api/v1/sites/{siteId}/metadata/{metadataId}/PUT, DELETE

Asynchronous Access (Callback Mechanism)

ResourceURIAvailable HTTPS Methods
Callback list Managementhttps://its.accuware.com/api/v1/sites/{siteId}/callbacks/GET, PUT, DELETE
Site levelhttps://its.accuware.com/api/v1/sites/{siteId}/callbacks/stations/GET
Site levelhttps://its.accuware.com/api/v1/sites/{siteId}/callbacks/stations/{mac}/PUT, DELETE
Node levelhttps://its.accuware.com/api/v1/sites/{siteId}/callbacks/nodes/GET
Node levelhttps://its.accuware.com/api/v1/sites/{siteId}/callbacks/nodes/{node_mac}/GET
Node levelhttps://its.accuware.com/api/v1/sites/{siteId}/callbacks/nodes/{node_mac}/stations/GET
Node levelhttps://its.accuware.com/api/v1/sites/{siteId}/callbacks/nodes/{node_mac}/stations/{mac}/PUT, DELETE

Synchronous Access

/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 Wi-Fi Location Monitor dashboard.
  • name: site name.
  • access: access levels for each account registered
  • cloudtrax_network: username  used to get access to the Cloudtrax dashboard (https://cloudtrax.com).

/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 Wi-Fi Location Monitor dashboard.
  • name: site name.
  • access: access levels for each account registered
  • cloudtrax_network: username  used to get access to the Cloudtrax dashboard (https://cloudtrax.com).

/api/v1/sites/{siteId}/nodes/

GET

Retrieves the information of all the nodes registered within a specific site.

Resource-wide template parameters:

  • {siteId}: site identification string

Available response representations:

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

Example:

Retrieve the list of nodes registered with siteId=”1001″:

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

JSON fields:

  • mac: MAC address of the node.
  • name: node’s name.
  • desc: node description (e.g. penthouse node).
  • levelId: level identification.
  • lrrt (Last Report Relative Time): difference in seconds between the last report transmitted by the node and the time the request was issued.
  • lrne (Last Report Number of Entries): number of unique stations transmitted by the node in its last report.

/api/v1/sites/{siteId}/nodes/{mac}/

GET

Retrieves the information of a specific node registered within a specific site.

Resource-wide template parameters:

  • {siteId}: site identification string
  • {mac}: the node’s MAC address

Available response representations:

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

Example:

Retrieve information about the node with MAC address 7072CF2148F0 from siteId=”1001″:

The result is a JSON object:

JSON fields:

  • name: node’s name.
  • desc: node description (e.g. penthouse node).
  • levelId: level identification.
  • lrrt (Last Report Relative Time): difference in seconds between the last report transmitted by the node and the time the request was issued.
  • lrne (Last Report Number of Entries): number of unique stations detected and trasmitted by the node in its last report.

PUT

Register a node within a selected site

Resource-wide template parameters:

  • {siteId}: site identification string
  • {mac}: the node’s MAC address

Accepted representations:

  • application/x-www-form-urlencoded

Node information:

  • Required fields are lat and lng.
  • Optional fields are name, desc, and  levelId.
If the node is new, it will be created. If the node was already registered, its information will be overwritten.
Example:

Register a node with MAC address AC86742148F0 in siteId=”1001″:

The result is a JSON object that describes the node just registered:

DELETE

Remove a node from the selected site

Resource-wide template parameters:

  • {siteId}: site identification string
  • {mac}: the node’s MAC address

Accepted representations:

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

Example:

Remove the node with MAC address AC86742148F0 from siteId 1001:

The result is a confirmation message:

Querying for a node just removed will return an HTTP 404 – Not found status code:

/api/v1/sites/{siteId}/stations/?loc=[yes|no]&type=[known|all]&lrrt=maxValue&rss=[yes|no]&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).
  • type [ known | all ]: the type of stations to query (default: type=known).
  • 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).
  • rss [ yes | no ]: a flag that determines if the server will return RSS data for each node in the response (default: rss=no). Click here to get more information about the RSS.
  • 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.
  • The “Known stations” are always included in the returned response regardless the value of the lrrt parameter.
  • Keep in mind that it will not be possible to see the location and the RSS for the “Known stations” just added into the “known devices” list but never seen by the nodes (even if loc=yes and rss=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: hMAC address of the station.
  • 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.

The Accuware Wi-Fi Location Monitor API does NOT return the manufacturer info (Mfr/Type) of the Wi-Fi devices. This information is added at run time by Javascript embedded inside the dashboard. If you are interested in having the same type of information, you can download the list of manufacturers prefixes from the official repository:

To find the manufacturer for a particular device, you use the first six digit of the station’s hMAC address for a look-up in the register (e.g AC:86:74XX:XX:XX –> Open Mesh Inc.).

Example 2:

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

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

JSON fields:

  • mac: hMAC address of the station.
  • name: station’s name.
  • desc: station description.
  • loc: station location.
  • 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.
  • rss: signal strength measured by all the nodes able to see the station. Click here to get more information about the RSS.

This API does NOT return the manufacturer info (Mfr/Type) of the Wi-Fi devices. This information is added at run time by Javascript embedded inside the dashboard. If you are interested in having the same type of information, you can download the list of manufacturers prefixes from the official repository:

To find the manufacturer for a particular device, you use the first six digit of the station’s hMAC address for a look-up in the register (e.g AC:86:74XX:XX:XX –> Open Mesh Inc.).

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

GET

Retrieves information about a specific station.

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {mac}: the station’s hMAC address.

Query parameters:

  • rss [yes | no] : a flag that determines if the server will return RSS data for each node in the response (default: rss=no).
  • 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 and RSS information about the station with hMAC address 148FC6H521YD 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: hMAC address of the station.
  • name: station’s name.
  • desc: station description.
  • loc: station location.
  • 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.
  • rss: signal strength measured by all the nodes able to see the station. Click here to get more information about the RSS.
  • areas: the list of geo-fences in which the device is located.

This API does NOT return the manufacturer info (Mfr/Type) of the Wi-Fi devices. This information is added at run time by Javascript embedded inside the dashboard. If you are interested in having the same type of information, you can download the list of manufacturers prefixes from the official repository:

To find the manufacturer for a particular device, you use the first six digit of the station’s hMAC address for a look-up in the register (e.g AC:86:74XX:XX:XX –> Open Mesh Inc.).

PUT

Registers a station in the list of known devices.

Resource-wide template parameters:

  • {siteId}: site identification string
  • {mac}: the station’s hMAC address

Accepted representations:

  • application/x-www-form-urlencoded

Station information:

  • The fields name and desc can contain empty values

Example:

Register a station with hMAC address 148FC6H521YD 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.
  • {mac}: the station’s hMAC address.

Accepted representations:

  • No information is passed along with the request.

Example:

Remove the station with hMAC address 148FC6H521YD 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/

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:

JSON fields:

  • desc: level’s description.
  • levelID: level identification number.
  • name: level’s name.
  • alt: altitude – not used at present.

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:

  • 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 floor plans 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 within the current site.

Resource-wide template parameters:

  • {siteId}: site identification string.

Accepted representations:

  • form-data

Example:

Upload a floor planon the level 4 of 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.

analytics.navizon.com/api/v1/sites/{siteId}/

GET

This API call, is a fast and easy way to retrieve the historical data shown inside the Analytics section of the Accuware dashboard.

Resource-wide template parameters:

  • {siteId}: site identification string.

Query parameters:

  • start: start time UTC timestamp (seconds). For more information see the paragraph below.
  • end: end time time UTC timestamp (seconds). For more information see the paragraph below.
  • nodes [node_mac1, node_mac2, node_mac3]
    The MAC address MUST be plain (without “:” or “-“). These formats are NOT accepted: 70:72:CF:21:EA:31, 70-72-CF-21-EA-31
  • series [serie1, serie2, serie3] Valid series values are:
    • unmc: number of unique WiFi devices seen by the nodes in the interval of time between start and end. More information can be found in the Analytics section of this page.
    • repc: number of reports sent by the nodes to the Accuware server in the interval of time between start and end. More information can be found in the Analytics section of this page.
    • idh3: number of “in-place” devices computed on a three hour basis (if a device is seen at least one time for three consecutive hours is considered to be “in-place”). NOTE: this metric is computed only hourly. More information can be found in the Analytics section of this page.
    • undh: number of new visitors seen during the previous hour. By “new” we mean never detected so far since the beginning of the day. NOTE: this metric is computed only hourly. More information can be found in the Analytics section of this page.
    • uoff: UTC offset in minutes at node’s location.
  • step: time step in minutes (accepted values: 10 min, 30 min, 60 minutes [1 hour], 1440 minutes [24 hours]).
  • export: export=csv will download a file with the data. Otherwise the response will be returned as a JSON.
  • labels: use this labels in the CSV header file.

Available response representations:

  • 200 OK – application/json
  • JSON representation

Example:

Retrieves number of unique WiFi devices seen by the node with MAC address 7072CF21EA31 from 2013-07-18 09:39:17 UTC (Epoch date: 1374140357) to 2013-07-18 10:29:17 UTC (Epoch date: 1374143357) for the site 1001 in San Diego.

The result is a JSON object:

JSON fields:

  • Time stamp: the Unix epoch time-stamp (or Unix time or POSIX time or Unix timestamp). It’s 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):
    • More information about the Unix epoch time-stamp can be found in this page.
    • More information about how to convert epoch to human readable date and vice versa can be found in this page.
  • Serie 1: in the example above is “UNMC”
  • Serie 2: in the example above is “UOFF” (equal to -420 minutes because San Diego is 7 hours behind the UTC timezone).

 

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

GET

Returns all the geo-fences for a specific level of a site

Resource-wide template parameters:

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

Available response representations:

  • 200 OK – application/json.
  • JSON representation of one or multiple geo-fences.

Example:

Returns the JSON representation of the geo-fences related to level “1” of site “1001”:

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

JSON fields:

  • id: geo-fence identification number.
  • levelID: level identification number.
  • behavior: not relevant at present.
  • class:  not relevant at present.
  • type: not relevant at present.
  • vertex: array of coordinates that defines the area.
  • name: ge-fence name. If no name was specified when creating, will be set to “”.

/api/v1/sites/{siteId}/metadata/

POST

Create a new geo-fence for a specific level of a site.

Resource-wide template parameters:

  • {siteId}: site identification string.

Accepted representations:

  • application/json

Example:

Create a geo-fence on Level “1” of site “1001”:

The result is a JSON that describes the geo-fence just created:

JSON fields:

  • id: geo-fence identification number.
  • levelID: level identification number.
  • behavior: not relevant at present.
  • name: ge-fence name. If no name was specified when creating, will be set to “”.
  • class:  not relevant at present.
  • type: not relevant at present.
  • vertex: array of coordinates that defines the area.

DELETE

Delete all the geo-fences associated to a site.

Resource-wide template parameters:

  • {siteId}: site identification string.

Example:

Delete all the geo-fence inside site “1001”:

The result is a confirmation message:

/api/v1/sites/{siteId}/metadata/{metadataId}/

PUT

Update an existing geo-fence defined by its ID

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {metadataId}: geo-fence identification string.

Available response representations:

  • application/json.

Example:

Update an the geo-fence with ID “1” inside site “1001”:

The result is a JSON that describes the geo-fence just modified:

JSON fields:

  • id: geo-fence identification number.
  • levelID: level identification number.
  • behavior: not relevant at present.
  • class:  not relevant at present.
  • type: not relevant at present.
  • vertex: array of coordinates that defines the area.
  • name: ge-fence name. If no name was specified when creating, will be set to “”.

DELETE

Delete an existing geo-fence defined by its ID

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {metadataId}: geo-fence identification string.

Example:

Delete the geo-fence with ID “15” inside site “1001”:

The result is a confirmation message:

Asynchronous Access (Callback Mechanism)

/api/v1/sites/{siteId}/callbacks/

GET

Retrieve the callback URL.

Resource-wide template parameters:

  • {siteId}: site identification string.

Available response representations:

  • 200 OK – application/json.

Example:

Retrieve the callback URL registered with siteId=”1001″:

The result is a JSON Object:

PUT

Register a callback URL.

Resource-wide template parameters:

  • {siteId}: site identification string.

Accepted representations:

  • application/x-www-form-urlencoded.

The callback URL will be passed in the callback field.

Example:

Register “http://my.domain.com/ItsPost.php” as callback URL for siteId=”1001″.

DELETE

Remove the callback URL and disable the notification system

Resource-wide template parameters:

  • {siteId}: site identification string.

Accepted representations:

  • No information is passed along with the request.

Example:

Disable the callback system for siteId=1001:

/api/v1/sites/{siteId}/callbacks/stations/

GET

Retrieve the hMAC addresses of the stations registered in the callback list of a site.

Resource-wide template parameters:

  • {siteId}: site identification string

Available response representations:

  • 200 OK – application/json

Example:

Retrieve the hMAC addresses of all the stations registered in the callback list of the  site 1001:

The result is a JSON Object:

/api/v1/sites/{siteId}/callbacks/stations/{mac}/

PUT

Register a Wi-Fi station to the callbacks list of a site.

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {mac}: the station’s hMAC address.

Accepted representations:

  • application/x-www-form-urlencoded

The callback URL will be passed in the callback field

Example:

Register the station with hMAC address 148FC6H521YD in the callback list of the site 1001:

The result is a JSON Object:

DELETE

Delete a station registered in a callback list of a site.

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {mac}: the station’s MAC address.

Accepted representations:

  • No information is passed along with the request.

Example:

Delete the station with hMAC address 148FC6H521YD from the callback list of the site 1001:

/api/v1/sites/{siteId}/callbacks/nodes/

GET

Retrieve the hMAC addresses of the stations registered in the callback list of each node.

Resource-wide template parameters:

  • {siteId}: site identification string

Available response representations:

  • 200 OK – application/json

Example:

Retrieve the hMAC addresses of all the stations registered in the callback list of each node of site 1001:

The result is a JSON Object:

/api/v1/sites/{siteId}/callbacks/nodes/{node_mac}/

GET

Retrieve the hMAC addresses of the stations registered in the callback list of a specific node.

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {node_mac}: node’s hMAC address.

Available response representations:

  • 200 OK – application/json.

Example:

Retrieve the MAC addresses of the stations registered in the callback list of the node with MAC address 70:72:CF:21:EB:13 in the site 1001:

The result is a JSON Object:

/api/v1/sites/{siteId}/callbacks/nodes/{node_mac}/stations/{mac}/

PUT

Register a station to the callbacks list of a specific node.

Resource-wide template parameters:

  • {siteId}: site identification string.
  • {node_mac}: node’s MAC address.
  • {mac}: the station’s hMAC address.

Accepted representations:

  • No information is passed along with the request

Example:

Register the station with hMAC address 148FC6H521YD in the callback list of the node with MAC address 18:87:96:B7:34:D1 in the site 1001:

DELETE

Delete a station registered in a callback list of a specific node.

Resource-wide template parameters:

  • {siteId}: site identification string
  • {node_mac}: node’s MAC address
  • {mac}: the station’s hMAC address

Accepted representations:

  • No information is passed along with the request.

Example:

Delete the station with hMAC address 148FC6H521YD from the callback list of the node with MAC address 18:87:96:B7:34:D1 in the siteId=1001: