A small application that shows some basic endpoints for managing weather sensors and the data produced by them. Specifically,
the application receives weather data from various sensors that report metrics - temperature
, humidity
, wind_speed
,
wind_direction
, and cloud_cover
.
- Receives new metric values as the weather changes around the sensor -
POST /sensors/{id/weather-metrics
. - Provides the capability to query the sensor metric data -
GET /sensors/{id/weather-metrics
andGET /weather-metrics
- Provides the capability to query summary data over a set of data -
GET /sensors/{id/weather-statistics
sum
min
max
average
A GET /weather-statistics
endpoint is not currently available. This endpoint would allow a summaary of aggregate data
across multiple sensors.
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
SensorApi | addSensor | POST /sensors | Add a new sensor |
SensorApi | getSensor | GET /sensors/{id} | Get sensor details |
SensorApi | querySensors | GET /sensors | Query all sensors |
WeatherMetricApi | importWeatherMetrics | POST /weather-metrics | Add weather metrics |
WeatherMetricApi | importWeatherMetricsBySensorId | POST /sensors/{id}/weather-metrics | Add metrics from the sensor. |
WeatherMetricApi | queryWeatherMetrics | GET /weather-metrics | Query the metrics previously persisted from the specified sensor. |
WeatherMetricApi | queryWeatherMetricsBySensorId | GET /sensors/{id}/weather-metrics | Query the metrics previously persisted from the specified sensor. |
WeatherStatisticApi | queryWeatherStatisticBySensorId | GET /sensors/{id}/weather-statistics | Query the weather metrics previously persisted from the specified sensor |
- CloudCover
- ConversionType
- Entity
- Sensor
- WeatherMetric
- WeatherStatistic
- WeatherStatisticType
- WindDirection
All endpoints do not require authorization.