API Documentation

Below we provide the documentation of the Weathercloud API v1.0 for developers



Introduction


This documentation ...?

URL formats


There are two formats in which you can create your URL, depending on how the parameters are separated:

  1. http://api.weathercloud.net/v01/set/wid/$WID/key/$Key/...<parameters>...
  2. http://api.weathercloud.net/v01/set?wid=$WID&key=$Key&...<parameters>...

User verification


For user verification we use the device Weathercloud ID (WID) and Key ...?

  • User verification requests must contain WID and Key only.

Timing


...?

  • Data interval is 10 minutes. 1 minute for Pro and Premium users only.
  • Requests faster than the corresponding data interval will be rejected.

Return codes


Code Description
200 Success
400 Bad request
401 Incorrect WID or Key
429 Too many requests
500 Unexpected server error

Parameters


This section lists all parameters that can be included in the API call to submit various environmental measurements. None of the parameters are required, and you may include any combination depending on your data. If a parameter requires conversion or scaling before sending, it will be specified in the description below. ...?

Temperature

Variables Unit Range Example
temp tempin temp02 tempagro chill dew dewin heat heatin Degrees Celsius (ºC) × 10 [-400, 600] 20.5 °C → 205

Humidity

Variables Unit Range Example
hum humin hum02 Percentage (%) [0, 100] 40 % → 40

Atmospheric Pressure

Variables Unit Range Example
bar hectopascals (hPa) × 10 [9000, 11000] 1013.0 hPa → 10130

Wind speed

Variables Unit Range Example
wspd wspdavg wspdhi meters per second (m/s) × 10 [0, 600] 12.5 m/s → 125

Wind direction

Variables Unit Range Example
wdir wdiravg wdirhi degrees (º) [0, 359] 180 ° → 180

Rain (Daily total)

Variables Unit Range Example
rain millimeters (mm) × 10 [0, 10000] 35.0 mm → 350

Rain rate

Variables Unit Range Example
rainrate millimeters per hour (mm/h) × 10 [0, 1000] 20.0 mm/h → 200

ET (Daily total)

Variables Unit Range Example
et millimeters (mm) × 10 [0, 1000] 7.5 mm → 75

Solar radiation

Variables Unit Range Example
solarrad watts per square meter (W/m²) × 10 [0, 20000] 1050.0 W/m² → 10500

UV index

Variables Unit Range Example
uvi index × 10 [0, 160] 8.0 → 80

Soil moisture

Variables Unit Range Example
soilmoist centibars (Cb) [0, 200] 100 cb → 100

Leaf wetness

Variables Unit Range Example
leafwet index [0, 15] 10 → 10

Air quality index (US AQI)

Variables Unit Range Example
aqi index [0, 500] 100 → 100

PM2.5

Variables Unit Range Example
pm25 micrograms per cubic meter (µg/m³) [0, 2000] 150 µg/m³ → 150

PM10

Variables Unit Range Example
pm10 micrograms per cubic meter (µg/m³) [0, 5000] 150 µg/m³ → 150

CO

Variables Unit Range Example
co parts per billion (ppb) [0, 10000] 750 ppb → 750

NO

Variables Unit Range Example
no parts per billion (ppb) [0, 2000] 250 ppb → 250

NO₂

Variables Unit Range Example
no2 parts per billion (ppb) [0, 2000] 250 ppb → 250

SO₂

Variables Unit Range Example
so2 parts per billion (ppb) [0, 2000] 250 ppb → 250

O₃

Variables Unit Range Example
o3 parts per billion (ppb) [0, 2000] 250 ppb → 250

Noise

Variables Unit Range Example
noise decibels (dB) × 10 [0, 1200] 60.0 dB → 600

Power supply

Variables Unit Range Example
pwrsply volts (V) × 10 [0, 240] 18.0 V → 180

Battery

Variables Unit Range Example
battery volts (V) × 10 [0, 240] 12.0 V → 120

Time

Variables Unit Range Example
time hhmm (UTC) [0, 2400] 14:15 → 1415

Date

Variables Unit Range Example
date yyyymmdd [20210101, 21001231] 2021-12-24 → 20211224

Software name and version

Variables Description Example
software String containing the software name and version (no spaces allowed). Weathercloud Software v2.4 → weathercloud_software_v2.4

Software ID

Variables Description Example
softwareid Assigned software ID in order to be identified by the API. 123a456b789c

Example


Before you start

You need the Weathercloud ID and KEY for the device you want to upload the data. You can find how to obtain it here.

Example Request

This example sends weather sensor data (temperature, humidity and atmospheric pressure) from a device to the API.

Command Line
curl https://api.weathercloud.net/v01/set/wid/{{YOUR_DEVICE_WID}}/key/{{YOUR_DEVICE_KEY}}/temp/205/hum/40/bar/10130

Parameters


wid  string  (required)

Your device’s Weathercloud ID. This is a unique identifier for your device on the Weathercloud platform.


key  string  (required)

Your device’s API key, used to authenticate your data submissions to the Weathercloud API.


temp  integer  (optional)

Represents the temperature in degrees Celsius, multiplied by 10.

For example: 20.5 °C → 205


hum  integer  (optional)

Represents the relative humidity in percentage (%).

For example: 60 % → 60


bar  integer  (optional)

Represents the atmospheric pressure in hPa, multiplied by 10.

For example: 1013.0 hPa → 10130

Example Response

Note: The HTTP status code is always 200 OK. The actual response status is included in the body.

Success

Response
200

This indicates that the request was successful and the data was received by the API.

Error

Response
429

This indicates that you have made too many requests in a short period of time.