In this section we will show how to retrieve the location of a station using the REST API provided by Navizon ITS. Before you begin, you should have already installed and configured your site as described in the documentation.
To run the examples you will need to know the ID of your site and the MAC address of the WiFi station you are querying. This two piece of information are used to create the URL for the request as in the following example:
NOTE: The JSON representation will contain the latest position computed for the device. If the station has
been previously saved in the list of known devices, the returned object will also contain a
If the device was not active in the site for the past two hours and it is not in the list of known devices, the
server will return a
HTTP 404 - Not Found error.
The easiest way to access the Navizon ITS API is using the command line tool
curl freely available at
http://curl.haxx.se/. Don't forget to replace
username:password with your email address and password (e.g.
use a proper site ID and MAC address.
curl -u username:password http://its.navizon.com/api/v1/sites/0000/stations/00:00:00:00:00:00/
The Restlet framework provides a convenient access the API from Java. Download the Java SE edition archive and extracts the files in a directory of your choice. Locate and add to your CLASSPATH the following JAR files:
The C# example uses JSON.NET to parse the response. The library is available at json.codeplex.com.
This example uses the JSON library for Ruby available as a
gem install json
To run this example, save the code in a file named
Base64.js located in the same directory as the HTML file.
For debugging and testing, you can also retrieve the location of a device using a browser. We recommend installing a plugin such as JSONView and JSONLint for Google Chrome, or JSONovich for Firefox. After you have installed the plugin, simply type the URL that correspond to your station and supply your credentials when prompted.