-
Notifications
You must be signed in to change notification settings - Fork 1
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
API function to find concept based on value #142
Comments
This would be very helpful for users and institutions that may want to use a vocabulary to map their data prior to sharing it with GBIF |
We have a basic full-text search: https://api.gbif.org/v1/vocabularies/LifeStage/concepts?q=joven I think |
I am confused by that function, if use https://api.gbif.org/v1/vocabularies/Sex/concepts?q=male, I get several concepts. Is there a way to find the concept that the value |
You get all the concepts of the vocabulary, it seems. Ideally, you should only get the concept that the verbatim value maps to (if the hidden value exists of course) |
That is a free-text search that matches any concept that has that value. I think what you want is a lookup endpoint but we don't have it (pipelines does a lookup but it's not an API endpoint). We could add it though. |
I think having a lookup would be really helpful. |
+1 |
Thanks @marcos-lg ! This looks great! (This works for example: https://api.gbif-uat.org/v1/vocabularies/GeoTime/concepts/lookup?q=pridolij) |
I replace non-ascii characters with their equivalents but it seems that https://api.gbif-uat.org/v1/vocabularies/GeoTime/concepts/lookup?q=přídoli |
Ha! Yes I probably did some wrong copy/pasting. Thanks for checking Marcos! The lookup looks good, it will be very helpful to have. |
(cherry picked from commit ceb4027)
(cherry picked from commit 7027e04)
(cherry picked from commit 9509ed2)
(cherry picked from commit beb50e0)
Deployed to production. E.g.: https://api.gbif.org/v1/vocabularies/LifeStage/concepts/lookup?q=adulto |
Forgot to mention that this also works for the |
Thank you! This super useful. |
It would be great to have an API function/endpoint where I can find which concept a value matches to for a given vocabulary.
For example, I would like to know which concept
jeune
matches to in the life stage vocabulary. Right now I have to query all the labels for all the concept until I find the right one.Instead, I would like to be able to do something like
https://api.gbif.org/v1/vocabularies/lifeStage/match?q=jeune
and be returned the concept for which the value matches (the value should be matched to any of the hidden or alternative or translation labels).The text was updated successfully, but these errors were encountered: