Skip to content
Alexandre Vallette edited this page Mar 1, 2016 · 10 revisions

Pheromon exposes, by default, a public API enabling anyone to get and reuse the open-data we are generating.

How to query the API

The API uses different routes to answers the demands:

  • GET routes that can be queried directly from the browser by pasting the correct url
https://pheromon.ants.builders/measurements/places?ids=19&types=wifi&start=2016-01-04&end=2016-01-05

Public routes

Here is a list of the routes available by anyone (Open-data):

  • /place/get/:id in GET: knowing the id of a place, get all its info
  • /place/getAll in GET: get all the places registered
  • /placeLatestMeasurement/:place/:type in GET: get latest measurement of one type for one place
  • /placesLatestMeasurement/:type in GET: get latest measurement of one type for all places
  • /measurements/places in GET with arguments ids, types, start and end: get various measurements of various types for various places
  • /measurements/place/raw with arguments id, type, start and end: get place measurements of a specified type without any processing.
  • /allPlacesInfos in GET get all places

Examples

from the browser, get all the places:

pheromon api in the browser

Clone this wiki locally