Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Url to show occurrence by occurrenceId #509

Open
vjrj opened this issue Sep 24, 2021 · 1 comment
Open

Url to show occurrence by occurrenceId #509

vjrj opened this issue Sep 24, 2021 · 1 comment

Comments

@vjrj
Copy link
Contributor

vjrj commented Sep 24, 2021

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?

@adam-collins
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants