Get Historical Data
Retrieve complete historical data for a sensor type including current value, statistics, trend analysis, and chart data.Query Parameters
ID of the greenhouse
Type of sensor (TEMPERATURE, HUMIDITY, CO2, LIGHT, etc.)
Time period for analysis. Options:
24h (hourly aggregation), 7d (daily), 30d (daily)Response
ID of the greenhouse
ID of the tenant
Type of sensor queried
Unit of measurement
Most recent sensor reading
Timestamp of current value (ISO 8601)
Average value over the period
Minimum value recorded in the period
Maximum value recorded in the period
Median value (if calculated)
Percentage change from average (positive or negative)
Trend direction:
INCREASING, DECREASING, or STABLEArray of time-series data points for charting
The period string used for this query
Start of the time range (ISO 8601)
End of the time range (ISO 8601)
Example Request
Example Response
Get Hourly Statistics
Retrieve hourly aggregated statistics for a sensor type.Query Parameters
ID of the greenhouse
Type of sensor
Number of hours to retrieve
Response
Start of the 1-hour bucket (ISO 8601)
ID of the greenhouse
ID of the tenant
Type of sensor
Unit of measurement
Average value for the hour
Minimum value in the hour
Maximum value in the hour
Standard deviation
Number of readings in the hour
Number of null readings
Timestamp of first reading in hour
Timestamp of last reading in hour
Example Request
Example Response
Get Daily Statistics
Retrieve daily aggregated statistics for a sensor type.Query Parameters
ID of the greenhouse
Type of sensor
Number of days to retrieve
Response
Returns an array of daily statistics with extended metrics:Start of the 1-day bucket (ISO 8601)
ID of the greenhouse
ID of the tenant
Type of sensor
Unit of measurement
Average value for the day
Minimum value in the day
Maximum value in the day
Standard deviation
Total number of readings in the day
Median value for the day
95th percentile value
5th percentile value
Number of null readings
Number of hours (0-24) that had readings
Timestamp of first reading in day
Timestamp of last reading in day
Example Request
Get Statistics Summary
Retrieve a summary of statistics (min/max/avg) without chart data.Query Parameters
ID of the greenhouse
Type of sensor
Time period. Options:
24h, 7d, 30dResponse
Returns a simple map of summary statistics:Average value over the period
Minimum value
Maximum value
Unit of measurement
Total number of readings in period
Example Request
Example Response
Get Sensor Trend
Calculate the trend (percentage change) for a sensor over a period.Path Parameters
Unique identifier for the sensor
Query Parameters
ID of the tenant (for multi-tenant filtering)
Time period. Examples:
24h, 7d, 30d, 60mResponse
Returns trend analysis for the sensor:ID of the sensor
Most recent value
Value at the start of the period
Percentage change (positive or negative)
Trend direction:
INCREASING, DECREASING, or STABLEPeriod used for calculation