v1

latestOpenAPI 3.0.32026-07-171140286.6 KB
Api\ResearchDataController

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

get/api/researchdata/{id}/user/{user_id}/{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).

device_idinteger

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

location_idinteger

The location_id to filter the hives, and measurements on (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: NONE.

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

value dient minimaal 0 te zijn.

timezonestring

only in case of 1 device requested, to provide 'normal' data view. Must be a valid time zone, such as <code>Africa/Accra</code>.

Example request

{
  "date_start": "2020-01-01 00:00:00",
  "date_until": "2020-09-29 23:59:59",
  "device_id": 1,
  "location_id": 2,
  "measurements": "non",
  "decimals": 1,
  "interval": "5m",
  "calculation": "MEAN",
  "calculation_prop": "DERIVATIVE",
  "limit": 10,
  "precision": "rfc3339",
  "timezone": "Asia/Almaty"
}

Response

object[] required

Example response

[
  {
    "id": 35211,
    "notes": "test",
    "reminder": null,
    "reminder_date": null,
    "impression": 2,
    "attention": 1,
    "created_at": "2020-03-26 18:28:00",
    "checklist_id": 798,
    "image_id": null,
    "owner": true,
    "thumb_url": null,
    "hive_id": 280,
    "items": []
  },
  {
    "id": 40162,
    "notes": "Input Liebefeld",
    "reminder": null,
    "reminder_date": null,
    "impression": null,
    "attention": null,
    "created_at": "2020-04-24 11:03:00",
    "checklist_id": 3206,
    "image_id": null,
    "owner": true,
    "thumb_url": null,
    "hive_id": 280,
    "items": [
      {
        "id": 326538,
        "value": "0.6",
        "inspection_id": 40162,
        "category_id": 977,
        "val": "0.6",
        "unit": "x 25cm2",
        "type": "square_25cm2"
      },
      {
        "id": 326539,
        "value": "4",
        "inspection_id": 40162,
        "category_id": 978,
        "val": "4",
        "unit": "x 25cm2",
        "type": "square_25cm2"
      },
      {
        "id": 326540,
        "value": "2",
        "inspection_id": 40162,
        "category_id": 979,
        "val": "2",
        "unit": "x 25cm2",
        "type": "square_25cm2"
      }
    ]
  },
  {
    "id": 40163,
    "notes": "Brood photograph",
    "reminder": null,
    "reminder_date": null,
    "impression": null,
    "attention": null,
    "created_at": "2020-04-24 11:07:00",
    "checklist_id": 3206,
    "image_id": null,
    "owner": true,
    "thumb_url": null,
    "hive_id": 280,
    "items": [
      {
        "id": 326567,
        "value": "1",
        "inspection_id": 40163,
        "category_id": 399,
        "val": "Ja",
        "unit": null,
        "type": "boolean"
      },
      {
        "id": 326568,
        "value": "https://assets.beep.nl/users/1/thumbs/inspection/jIcycTYnO8zYq6SHCvAwPHb97BDLFkZaDmfZUop5.png",
        "inspection_id": 40163,
        "category_id": 973,
        "val": "https://assets.beep.nl/users/1/thumbs/inspection/jIcycTYnO8zYq6SHCvAwPHb97BDLFkZaDmfZUop5.png",
        "unit": null,
        "type": "image"
      }
    ]
  },
  {
    "id": 68477,
    "notes": null,
    "reminder": null,
    "reminder_date": null,
    "impression": 3,
    "attention": 1,
    "created_at": "2020-10-23 12:43:00",
    "checklist_id": 3206,
    "image_id": null,
    "owner": true,
    "thumb_url": null,
    "hive_id": 281,
    "items": []
  },
  {
    "id": 68478,
    "notes": "Hive change",
    "reminder": null,
    "reminder_date": null,
    "impression": null,
    "attention": null,
    "created_at": "2020-10-23 13:12:33",
    "checklist_id": null,
    "image_id": null,
    "owner": true,
    "thumb_url": null,
    "hive_id": 281,
    "items": [
      {
        "id": 522496,
        "value": "2",
        "inspection_id": 68478,
        "category_id": 85,
        "val": "2",
        "unit": null,
        "type": "number_positive"
      },
      {
        "id": 522497,
        "value": "2",
        "inspection_id": 68478,
        "category_id": 87,
        "val": "2",
        "unit": null,
        "type": "number"
      },
      {
        "id": 522498,
        "value": "10",
        "inspection_id": 68478,
        "category_id": 89,
        "val": "10",
        "unit": null,
        "type": "number_positive"
      }
    ]
  }
]