[API-users] /species/suggest - higherClassificationMap question

Szlamka József szlajozs at gmail.com
Fri Mar 11 17:43:37 UTC 2022

Hi API gurus,

I assume, the search box functionality in the species page of gbif 
homepage (e.g.: https://www.gbif.org/species/5298708) is based on 
"suggest". There each result contains the scientific name and the full 
taxonomic hierarchy e.g. "Iris pumila subsp. attica (Boiss. & Heldr.) 
K.Richt. Subspecies  | Plantae > Tracheophyta > Liliopsida > Asparagales 
 > Iridaceae > Iris > Iris pumila".

My question: how is the hierarchy implemented? Is it based on 
"higherClassificationMap"? How?

When I play with the suggest api, the XMLHttpRequest responseText in raw 
text format contains the taxonomic hierarchy correctly (i.e. the 
physical order of the entries in "higherClassificationMap" is correct). 
Unfortunately after JSON.parse the resulting javascript object does not 
hold any information about the physical order of the key/value pairs.

Is there any smart way to overcome this, or shall I hardcode the 
hierarchy manually?

Thanks in advance.

József Szlamka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gbif.org/pipermail/api-users/attachments/20220311/2a8f4027/attachment.html>

More information about the API-users mailing list