AtlasOfLivingAustralia/biocache-hubs

Url to show occurrence by occurrenceId

vjrj opened this issue · 1 comments

vjrj commented

We are interested in a some biocache-hub url by occurrenceId, that is, given a GBIF occurrence:
https://www.gbif.org/occurrence/78476756
to get our LA portal equivalent using the occurrenceId, in this case : 5C1A325E-491E-4028-B7F7-0F499E641B3C.

We are using, as a workaround:
https://registros.gbif.es/occurrences/search?q=occurrence_id%3A5C1A325E-491E-4028-B7F7-0F499E641B3C
but returns the search list and not the occurrence directly.

But would we nice to have some url like
https://biocache.la-portal/occurrenceid/5C1A325E-491E-4028-B7F7-0F499E641B3C

similar to
https://github.com/AtlasOfLivingAustralia/biocache-hubs/blob/develop/grails-app/controllers/au/org/ala/biocache/hubs/BiocacheHubsUrlMappings.groovy#L28

Does exists something similar already? If not, is a PR for this welcome?

This is problematic because occurrenceID is not necessarily unique, e.g. 2 occurrences for this occurrenceID https://registros.gbif.es/occurrences/search?q=occurrenceID:0025652B-1DA3-499E-A76E-BFB4EBA68DF8

I would consider it appropriate (PR welcome) to have a query parameter added to occurrences/search, e.g. follow=true, that would return the occurrence page when there is only one result. The list would still be returned when there is more than one result.