v1

latestOpenAPI 3.0.32026-07-171140286.6 KB
Api\ResearchDataController

api/researchdata/{id}/data/{item} GET List all research 'item' data within the consent=1 periods within a Research. The 'item' field indicates the type of data (apiaries/locations/devices/inspections/measurements/weather) to request within the research (which the user gave consent for to use). Example: inspectionsResponse: api/researchdata/1/inspections.

get/api/researchdata/{id}/data/{item}

Headers

Authorizationstring
Content-Typestring
Acceptstring
Accept-languagestring

Request body

date_startstring

The date in 'YYYY-MM-DD HH:mm:ss' format (2020-01-01 00:00:00) to request data from (default is beginning of research, or earlier (except inspections and measurements).

date_untilstring

The date in 'YYYY-MM-DD HH:mm:ss' format (2020-09-29 23:59:59) to request data until (default is until the end of the user consent, or research end).

year_monthsstring

Comma separated string of YYYY-MM strings to filter ONLY measurment data.

device_idsstring

Comma separated string of device_ids to filter the measurements on (next to date_start and date_until).

device_idinteger

The device_id to filter measurements on (next to date_start and date_until).

location_idsstring

Comma separated string of location_ids to filter measurements (next to date_start and date_until).

location_idinteger

The location_id to filter and measurements (next to date_start and date_until).

measurementsstring

Comma separated string of measurements (e.g. weight_kg,t_i,t_0,t_1) to query. Default: * (all measurments available).

decimalsinteger

Specifies the optional maximum amount of decimals that the (InfluxDB) calculation returns. Default: 2.

intervalstring

Specifies the optional (InfluxDB GROUPBY) time interval to interpolate measurements (*(all values)/1m/5m/30m/1h/1d/1w/30d/365d) m (minutes), h (hours), d (days), w (weeks). Default: 1d.

calculationstring

Specifies the optional (InfluxDB) calculation (NONE/FIRST/LAST/MEAN/MEDIAN/MIN/MAX/SUM/COUNT/SPREAD/STDDEV/DERIVATIVE/PERCENTILE/BOXPLOT/PEAKS/WEEKMAP/NETWEIGHT) for use with time interval. Default: MEAN.

calculation_propstring

Specifies the optional (InfluxDB) calculation property for i.e. PERCENTILE/DERIVATIVE/etc). Default: null.

limitinteger

Specifies the maximum number of measurements per location_research (InfluxDB LIMIT), Max: 5000. Default: 5000.

precisionstring

Specifies the optional InfluxDB format/precision (rfc3339/h/m/s/ms/u) of the timestamp of the measurements and weather data: rfc3339 (YYYY-MM-DDTHH:MM:SS.nnnnnnnnnZ), h (hours), m (minutes), s (seconds), ms (milliseconds), u (microseconds). Precision defaults to rfc3339.

indexinteger

Historic index of the interval from now. 0=period with current time included. 1=previous interval. Required without end.

timezonestring

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

output_csv_linksboolean

Optionally provide true if you want the data to be returned as an array of CSV files in stead of JSON data.

Example request

{
  "date_start": "2020-01-01 00:00:00",
  "date_until": "2020-09-29 23:59:59",
  "year_months": "2020-01,2021-02",
  "device_ids": "1,3,6",
  "device_id": 1,
  "location_ids": "1,3,6",
  "location_id": 2,
  "measurements": "dolorem",
  "decimals": 1,
  "interval": "5m",
  "calculation": "MAX",
  "calculation_prop": "5",
  "limit": 500,
  "precision": "rfc3339",
  "timezone": "Europe/Amsterdam",
  "output_csv_links": true
}