GeoSamples / sesar-rest-api

SESAR REST API Spring Boot Project
Apache License 2.0
2 stars 1 forks source link

REST API for Query user's entries by sample name #2

Open lulin-song opened 5 years ago

lulin-song commented 5 years ago

From Jim Bowring

We would like to be able to query a user's entries by sample name (not IGSN) to check for possible duplications - the API does not show this option - does it exist?

Thanks, Jim

lulin-song commented 4 years ago

REST API for retrieving IGSN according user code and sample name is implemented.

Screen Shot 2020-05-31 at 3 18 34 PM
ramdeensarah commented 4 years ago

Tested the following using usercode = IESER

Successfully able to search by user code and narrow down by name. Used name "SMA1958-010" to find one sample. "Green Grossular 1" returns three samples (as expected).

Searching for "Green Grossular" returns zero results (partial name).
Consideration - Can there be a way to search for partial matches? (this might be too difficult or outside scope of tool).

Failed aspects When 'hideprivate' is set to 1, it should not display private samples. If I do a search for sample name="Green Grossular 1" and user code 'IESER', it returns "IESER001M", "IESER001J", "IESER001R". "IESER001R" has a release date of 2022-06-01 and should not be visible.

Tested 'hideprivate'=1, limit =50, and user code="IESER'. Results include samples which should be hidden "IESER000V".

lulin-song commented 4 years ago

Tested the following using usercode = IESER

Successfully able to search by user code and narrow down by name. Used name "SMA1958-010" to find one sample. "Green Grossular 1" returns three samples (as expected).

Searching for "Green Grossular" returns zero results (partial name). Consideration - Can there be a way to search for partial matches? (this might be too difficult or outside scope of tool).

Failed aspects When 'hideprivate' is set to 1, it should not display private samples. If I do a search for sample name="Green Grossular 1" and user code 'IESER', it returns "IESER001M", "IESER001J", "IESER001R". "IESER001R" has a release date of 2022-06-01 and should not be visible.

Tested 'hideprivate'=1, limit =50, and user code="IESER'. Results include samples which should be hidden "IESER000V".

I thought about this. 'IGSN' itself is always public regardless of the private or public flag. 'private' only refers to the metadata. Let me see if I can hide those IGSNs.