Get weight samples
GET/biology/biomass/weight-samples
Get stored weight samples for one site or one unit within a time window.
- The time window is half-open: fromTime is inclusive and toTime is exclusive. This means that iterating over multiple windows, you will not get any duplicate messages.
- At least one of siteId or unitId must be given.
- The response is array of messages within the time window
- The order of the returned messages is not guaranteed.
Request
Responses
- 200
- 400
- 422
OK
The query parameters failed validation: fromTime and toTime are required and must be ISO 8601 with Zulu time zone, siteId and unitId must be positive integers and at least one of them must be given, toTime must not be earlier than fromTime, and the time window must not exceed 90 days.
The request was valid but could not be processed. The response carries one of the following codes:
- too_many_results_found: the time window matched more than 10 000 samples. Narrow the window and retry.
- unit_does_not_belong_to_site: both siteId and unitId were given and the unit is not on that site.
- not_found: the caller has no read access to the resolved site, or unitId is unknown. The same code is used for both cases.