Skip to content

Latest commit

 

History

History
136 lines (89 loc) · 5.53 KB

WeatherMetricApi.md

File metadata and controls

136 lines (89 loc) · 5.53 KB

WeatherMetricApi

All URIs are relative to http://localhost

Method HTTP request Description
importWeatherMetrics POST /weather-metrics Add weather metrics
importWeatherMetricsBySensorId POST /sensors/{id}/weather-metrics Add metrics from the sensor.
queryWeatherMetrics GET /weather-metrics Query the metrics previously persisted from the specified sensor.
queryWeatherMetricsBySensorId GET /sensors/{id}/weather-metrics Query the metrics previously persisted from the specified sensor.

importWeatherMetrics

WeatherMetric importWeatherMetrics(WeatherMetric)

Add weather metrics

The sensor data is added to the application.

Parameters

Name Type Description Notes
WeatherMetric WeatherMetric

Return type

WeatherMetric

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

importWeatherMetricsBySensorId

WeatherMetric importWeatherMetricsBySensorId(id, WeatherMetric)

Add metrics from the sensor.

The sensor data is added to the application.

Parameters

Name Type Description Notes
id Long ID of the sensor [default to null]
WeatherMetric WeatherMetric

Return type

WeatherMetric

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

queryWeatherMetrics

List queryWeatherMetrics(id, sensor_id, temperature, humidity, wind_speed, wind_direction, cloud_cover, timestamp, start, end)

Query the metrics previously persisted from the specified sensor.

Parameters

Name Type Description Notes
id Long ID of the sensor weather metric [optional] [default to null]
sensor_id Long The id of the Weather Sensor [optional] [default to null]
temperature Integer The temperature reported by the Weather Sensor [optional] [default to null]
humidity Integer The humidity percentage reported by the Weather Sensor [optional] [default to null]
wind_speed Integer The wind speed reported by the Weather Sensor [optional] [default to null]
wind_direction WindDirection The wind direction reported by the Weather Sensor [optional] [default to null] [enum: N, NE, NNE, NW, NNW, S, SE, SSE, SW, SSW, ENE, ESE, W, WNW, WSW]
cloud_cover CloudCover The cloud cover reported by the Weather Sensor [optional] [default to null] [enum: CLEAR, SUNNY, MOSTLY_SUNNY, CLOUDY, MOSTLY_CLOUDY, RAINING]
timestamp Date The timestamp for a weather metrics event [optional] [default to null]
start Date The start date-time a weather metrics event [optional] [default to null]
end Date The end date-time for a weather metrics event [optional] [default to null]

Return type

List

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

queryWeatherMetricsBySensorId

List queryWeatherMetricsBySensorId(id, temperature, humidity, wind_speed, wind_direction, cloud_cover, timestamp, start, end)

Query the metrics previously persisted from the specified sensor.

A list of sensor weather metrics.

Parameters

Name Type Description Notes
id Long ID of the sensor [default to null]
temperature Integer The temperature reported by the Weather Sensor [optional] [default to null]
humidity Integer The humidity percentage reported by the Weather Sensor [optional] [default to null]
wind_speed Integer The wind speed reported by the Weather Sensor [optional] [default to null]
wind_direction WindDirection The wind direction reported by the Weather Sensor [optional] [default to null] [enum: N, NE, NNE, NW, NNW, S, SE, SSE, SW, SSW, ENE, ESE, W, WNW, WSW]
cloud_cover CloudCover The cloud cover reported by the Weather Sensor [optional] [default to null] [enum: CLEAR, SUNNY, MOSTLY_SUNNY, CLOUDY, MOSTLY_CLOUDY, RAINING]
timestamp Date The timestamp for a weather metrics event [optional] [default to null]
start Date The start date-time a weather metrics event [optional] [default to null]
end Date The end date-time for a weather metrics event [optional] [default to null]

Return type

List

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json