Skip to content
asyrjasalo edited this page Apr 24, 2012 · 35 revisions

JSON API

Getting all the hotspots near some location

HTTP method: GET

curl http://wpoint.herokuapp.com/api/v1/spots.json?latitude=62&longitude=26

This gets all the hotspots in requested location (latitude, longitude) within 200 meters. 200 meters is the default setting in the server.

Radius can be given as an optional parameter

curl http://wpoint.herokuapp.com/api/v1/spots.json?latitude=62&longitude=26&radius=100

This gets all the hotspots in requested location (latitude, longitude) within 100 meters.

Reporting all the found hotspots in your location

HTTP method: POST

curl -X POST -F "data={ "latitude" : 62.00000000000000, "longitude" : 26.00000000000000, "results": [ { "bssid" : "F0:F0:F0:F0:F0:F0", "ssid" : "EpicWLAN", "dbm" : -10, "open" : true }, { "bssid" : "11:11:11:11:11:11", "ssid" : "Free", "dbm" : -20, "open" : true }, { "bssid" : "AA:AA:AA:AA:AA:AA", "ssid" : "Home", "dbm" : -30, "open" : false } ]}" http://wpoint.herokuapp.com/api/v1/report.json

Response status codes

201: Reports successfully saved on server. 500: Saving report failed.

Clone this wiki locally