SpotAiR - API documentation

Welcome to the page dedicated to the SpotAiR API

Licence

To use or provide data to SpotAiR, you must comply with the license available on the License page.

Services

The services are available on the following base URL: https://data.spotair.mobi

/balises/releve-put.php: record a weather station report

The first step is to request a provider code and a station code. SpotAiR then provides you a password associated to your provider code. You will need to provide this 3 informations for every record on SpotAiR.
  • method: POST
  • parameters: none
  • body: a JSON abject with this structure:
    {
    	provider: "<provider code>", (string | code you received from the SpotAiR administrator)
    	password: "<password>", (string | password you received from the SpotAiR administrator)
    	station: "<station code>", (string | code you received from the SpotAiR administrator)
    	timestamp: <report timestamp>, (integer | seconds, unix timestamp)
    	direction: <wind direction>, (integer | ° | 0-359)
    	instantdir: <wind instantaneous direction>, (integer | ° | 0-359)
    	vmin: <wind minimum speed>, (real | kph)
    	vmoy: <wind average speed>, (real | kph)
    	vmax: <wind maximum speed>, (real | kph)
    	temperature: <temperature>, (real | °C)
    	dewpoint: <dew point>, (real | °C)
    	hydrometry: <hydrometry>, (real | mm per hour)
    	cloudceiling: <cloud ceiling altitude>, (integer | m)
    	pressure: <pressure>, (integer | hPa)
    	luminosity: "<luminosity>", (string)
    	humidity: <humidity>, (integer | %)
    }
    bold: mandatory fields

  • response: a JSON object with this structure:
    {
    	code: <code retour>, (integer | 0=success, error otherwise)
    	msg: "<message>", (string)
    	data: null (reserved)
    }