<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Martin,
<div class=""><br class="">
</div>
<div class="">you should be using the species/root call from our species API:</div>
<div class=""><a href="http://www.gbif.org/developer/species#nameUsages" class="">http://www.gbif.org/developer/species#nameUsages</a></div>
<div class=""><br class="">
</div>
<div class="">It takes the datasetKey you are interested in, for example for the GBIF backbone taxonomy this call is:</div>
<div class=""><a href="http://api.gbif.org/v1/species/root/d7dddbf4-2cf0-4f39-9b2a-bb099caae36c" class="">http://api.gbif.org/v1/species/root/d7dddbf4-2cf0-4f39-9b2a-bb099caae36c</a></div>
<div class=""><br class="">
</div>
<div class="">Subsequent, pageable childs are then retrieved with:</div>
<div class=""><a href="http://api.gbif.org/v1/species/1/children" class="">http://api.gbif.org/v1/species/1/children</a></div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">The search you have been doing is across all checklist datasets we have indexed so you get kingdoms from hundreds of different taxonomies.</div>
<div class=""><br class="">
</div>
<div class="">best,</div>
<div class="">Markus</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
--<br class="">
Markus Döring</div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Software Developer<br class="">
Global Biodiversity Information Facility (GBIF)<br class="">
<div class=""><a href="mailto:mdoering@gbif.org" class="">mdoering@gbif.org</a></div>
<div class=""><a href="http://www.gbif.org" class="">http://www.gbif.org</a></div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
<br class="Apple-interchange-newline">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 19 Dec 2015, at 14:26, Martin Wendt <<a href="mailto:gbif@wwwendt.de" class="">gbif@wwwendt.de</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
I try to implement a lazy-loading taxonomy tree (as a demo for a open source javascript tree plugin).
<div class=""><br class="">
</div>
<div class="">See here for an example:</div>
<div class=""><a href="http://rawgit.com/mar10/fancytree/master/demo/taxonomy-browser/index.html#key=7348228" class="">http://rawgit.com/mar10/fancytree/master/demo/taxonomy-browser/index.html#key=7348228</a></div>
<div class=""><br class="">
<div class="">What JSON API should use to get the top level nodes (i.e. Kingdoms)?<br class="">
Currently I call <br class="">
<a href="http://api.gbif.org/v1/species/search?rank=kingdom" class="">http://api.gbif.org/v1/species/search?rank=kingdom</a><br class="">
but this returns much more than the ~7 entries I expect (Animalia, Plantae, Fungi, …)<br class="">
<br class="">
I seem to get reasonable results, if I only display nodes with key == nubKey.</div>
<div class=""><br class="">
</div>
<div class="">But the search results retrieved by `species/search?q=homo sapiens` returns multiple hits, and some of them have keys different from nubKey.</div>
<div class="">Those matches seem to be descendants of an `Animals` kingdom that also has nubKey != key.<br class="">
<div class=""><br class="">
</div>
<div class="">I guess my mental model of the data structure is too naïve:<br class="">
</div>
<div class="">- why are there different ‚Animals‘ kingdoms with different keys but identical nubKey?</div>
<div class="">- does it make sense at all to display a tree (with only one ‚animals‘ node)?</div>
<div class="">- when I restrict the search results to entries that have a kingdom with key == nubKey, what will the user miss?</div>
<div class=""><br class="">
</div>
Thanks<br class="">
Martin Wendt</div>
</div>
</div>
_______________________________________________<br class="">
API-users mailing list<br class="">
<a href="mailto:API-users@lists.gbif.org" class="">API-users@lists.gbif.org</a><br class="">
http://lists.gbif.org/mailman/listinfo/api-users<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>