Closed MortenHofft closed 2 years ago
The current suggest endpoint has little value from a UI perspective (instead we use the search endpoint) https://api.gbif.org/v1/vocabularies/EstablishmentMeans/concepts/suggest?limit=100&q=i
it allows you to search by ID and returns only the IDs. Users expect to see and search by the label.
search not ideal Example: the label for introduced is Introduced (Alien, Exotic, Non-native, Nonindigenous). https://api.gbif.org/v1/vocabularies/EstablishmentMeans/concepts/introduced
introduced
Introduced (Alien, Exotic, Non-native, Nonindigenous)
It is natural to assume that I can search for alien, but that will give no results.
alien
result format no ideal And even if it did, then I would have to do a lookup once per entry to get the label in the correct language.
Suggestion https://api.gbif.org/v1/vocabularies/EstablishmentMeans/concepts/suggest?limit=100&q=alien
should return something like
[ { "name": "introduced", "label": { "en": "Introduced (Alien, Exotic, Non-native, Nonindigenous)", "es-ES": "Introducida" } ]
and an option to restrict to a locale https://api.gbif.org/v1/vocabularies/EstablishmentMeans/concepts/suggest?limit=100&q=intro&locale=es-ES // searching for alien would then return no results
[ { "name": "introduced", "label": { "es-ES": "Introducida" }, ]
Deployed to PROD
The current suggest endpoint has little value from a UI perspective (instead we use the search endpoint) https://api.gbif.org/v1/vocabularies/EstablishmentMeans/concepts/suggest?limit=100&q=i
it allows you to search by ID and returns only the IDs. Users expect to see and search by the label.
search not ideal Example: the label for
introduced
isIntroduced (Alien, Exotic, Non-native, Nonindigenous)
. https://api.gbif.org/v1/vocabularies/EstablishmentMeans/concepts/introducedIt is natural to assume that I can search for
alien
, but that will give no results.result format no ideal And even if it did, then I would have to do a lookup once per entry to get the label in the correct language.
Suggestion https://api.gbif.org/v1/vocabularies/EstablishmentMeans/concepts/suggest?limit=100&q=alien
should return something like
and an option to restrict to a locale https://api.gbif.org/v1/vocabularies/EstablishmentMeans/concepts/suggest?limit=100&q=intro&locale=es-ES // searching for
alien
would then return no results