v1

latestOpenAPI 3.0.32026-07-171140286.6 KB
Api\MeasurementController

api/sensors/measurements GET Request all sensor measurements from a certain interval (hour, day, week, month, year) and index (0=until now, 1=previous interval, etc.)

get/api/sensors/measurements

Headers

Authorizationstring
Content-Typestring
Acceptstring
Accept-languagestring

Request body

idinteger

ID to look up the sensor (Device)

keystring

DEV EUI to look up the sensor (Device).

hive_idinteger

Hive ID to look up the sensor (Device)

startstring

Date for start of measurements. Required without interval & index.

endstring

Date for end of measurements. Required without interval & index.

indexinteger

Interval index (>=0; 0=until now, 1=previous interval, etc.). Default: 0.

intervalstring

Data interval for interpolation of measurement values: hour (2min), day (10min), week (1 hour), month (3 hours), year (1 day). Default: day.

timeGroupstring
namesstring

comma separated list of Measurement abbreviations to filter request data (weight_kg, t, h, etc.)

weatherinteger

Load corresponding weather data from the weather database (1) or not (0).

clean_weightinteger
timezonestring

Provide the front-end timezone to correct the time from UTC to front-end time.

relative_intervalinteger

Load data from the selected interval relative to current time (1), or load data in absolute intervals (from start-end of hour/day/week/etc) (0). Default: 0.

Example request

{
  "id": 2,
  "key": "omnis",
  "hive_id": 6,
  "start": "2020-05-27 16:16",
  "end": "2020-05-30 00:00",
  "index": 8,
  "interval": "dolores",
  "timeGroup": "et",
  "names": "omnis",
  "weather": 1,
  "clean_weight": 8,
  "timezone": "Europe/Amsterdam",
  "relative_interval": 14
}