NoiseTube logo

API documentation

Data collecting API

We describe here the process to feed the noisetube server of pollution data.

That's it! You have created a trace that will be published and sharable through the website after its processing.


Access to the data commons API

We describe here the web functions to track or get the raw collected data

Function: API/Search

Description: search the last measures having such criteria

Parameters Description Format Default Required
key the API key belonging to a user     x
user user associated with the measure      
tag tag associated with the measure integer (max=100)    
city ID of the city integer    
geo a bounding box

left,bottom,right,top (e.g. geo=11.54,48.142,11.5439,48.1454)

  • left is the longitude of the left side of the bounding box.
  • bottom is the latitude of the bottomside of the bounding box.
  • right is the longitude of the right side of the bounding box.
  • top is the latitude of the top side of the bounding box.
   
dbmax maximum value of decibel integer    
dbmin minimum value of decibel integer    
since measures since this date timestamp in milliseconds    
until measures until this date timestamp in milliseconds    
max the maximum number of measures returned integer , max=100 20  
format(todo) the output format json,rss json  

Examples:

JSON Return:

dataset=[{"lat":48.8536,"lng":2.38021,"tags":[],"date":1240213058000,"l":68},
{"lat":48.8536,"lng":2.38021,"tags":[],"date":1240213067000,"l":66},
{"lat":48.8536,"lng":2.38021,"tags":["colleague"],"date":1240213268000,"l":57}]

Function: /users/{username}/tracks/{track.id}.json

Description:

Give the the measures associated to the trace with the id {trace.id} of the user {user.id}

Examples:

http://www.noisetube.net/users/nico/traces/123.json // give the associated measures of the traces with ID=123
http://www.noisetube.net/users/nico/traces/last.json // give the last trace generated by the user

JSON Return:

dataset=[{"lat":48.8536,"lng":2.38021,"tags":[],"date":1240213058000,"l":68},
{"lat":48.8536,"lng":2.38021,"tags":[],"date":1240213067000,"l":66},
{"lat":48.8536,"lng":2.38021,"tags":["colleague"],"date":1240213268000,"l":57}]