Wiki

Clone wiki

geomena / APIProposal

API Proposal

The Geomena read/write API is separate from the Geode interface used by Firefox to query locations. This API is meant to be used to contribute to the Geomena project. Return values are in JSON.

Add/Update Access Point

URL: /ap/<mac-address>

mac-address: AP Mac address as 12 characters (eg. 002a1a332f63)

HTTP Method: POST

Required Parameters:

  • key: not yet implemented API key
  • latitude: latitude of AP
  • longitude: longitude of AP

Optional Parameters:

  • address: not yet implemented, only used if latitude/longitude not provided
  • ssid: name of AP
  • channel: not yet implemented channel (1-11) used by AP
  • userid: not yet implemented ID of user providing data

Response: Status of POST

Bulk Add/Update Access Points

URL: /ap/

HTTP Method: POST

JSON Values:

{key: "XXXXXXXX", aps: [{mac: "XX:XX:XX:XX:XX:XX", latitude: XX.YYYYYY, longitude: XX.YYYYYY}, {mac: "XX:XX:XX:XX:XX:XX", latitude: XX.YYYYYY, longitude: XX.YYYYYY}]}

Response: Status of POST

Retrieve Access Point Data

THIS IS A SPEC METHOD -- NOT YET IMPLEMENTED

URL: /ap

HTTP Method: GET

Required Parameters:

  • key: API key
  • mac: AP Mac address

Response:

Most recent data for this AP.

Sample response: { mac: '00:00:00:00:00', latitude: 45.512345, longitude: -122.612345, ssid: 'Backspace', channel: 11 }

New API location

http://api.geomena.org/v1/...

Updated