terraref / brapi

Breeder's API implementation for TERRA-REF
https://terraref.org/brapi/v1/calls
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

fix observationunits endpoint #43

Closed dlebauer closed 4 years ago

dlebauer commented 4 years ago

fixes #39; can now query observationunits without ObservationUnitDbId parameter

@max-zilla since you put in this feature, can you please comment on whether it is needed, and if this is the appropriate fix for #39?

max-zilla commented 4 years ago

This change should be functional, the main caveat IIRC is that it might yield a lot of observations if your query has a lot of plots in it, the "only show them for one plot" was sort of a response size management technique, but given you have a use case to avoid that restriction I say go ahead.

dlebauer commented 4 years ago

also, there is pagination so while the sql query may be a bit slow, the response only includes the first 1000 records