Get lice counts
GET/biology/lice-counts
Get stored lice counts for one site or one unit within a time window.
Currently only lice counts from automatic lice counting devices are available. In the future this endpoint will return all available lice counts for a site or unit.
- The time window is matched against dateTime, the time the count was observed. It is half-open: fromTime is inclusive and toTime is exclusive. This means that iterating over multiple windows, you will not get any duplicate counts.
- At least one of siteId or unitId must be given.
- The response is an array of counts within the time window, ordered by dateTime descending and then by unitId ascending.
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 counts. 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 siteId or unitId is unknown. The same code is used for all cases.