BrAPI icon indicating copy to clipboard operation
BrAPI copied to clipboard

Filter Germplasm by Acquisition Date

Open dwaring87 opened this issue 10 months ago • 2 comments

We have a use-case where we'd like to be able to search germplasm by the acquisitionDate property. Ideally, we'd like to be able to find germplasm that were acquired after a certain date or between specific dates.

Our idea is that we could use the GET /germplasm or POST /search/germplasm endpoints to filter germplasm by acquisition date. However, a simple equality parameter would not be enough to find matches for a range of dates. Our idea is to add these parameters:

  • acquisitionDate - include germplasm that match an exact date in YYYYMMDD format
  • minAcquisitionDate - include germplasm that have an acquisition date >= the parameter value
  • maxAcquisitionDate - include germplasm that have an acquisition date <= the parameter value

The minAcquisitionDate and maxAcquisitionDate parameters could be combined to filter germplasm by a range of dates.

Any thoughts on this idea?

dwaring87 avatar Feb 05 '25 14:02 dwaring87

sounds good to me 👍 Would it be ok if we only kept minAcquisitionDate and maxAcquisitionDate? In other places in the spec we only have start/end or min/max parameters, then in a request if min equals max, that is an exact value.

BrapiCoordinatorSelby avatar Feb 11 '25 20:02 BrapiCoordinatorSelby

Just having the min and max makes sense to me

dwaring87 avatar Feb 19 '25 14:02 dwaring87