<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I believe the rationale of the waypoints was that initially, it was expected that resource children/ archival objects would fall into a more balanced tree structure, but it turned out that there were many flat hierarchies with hundreds of top level children, and getting all of the children at once was not working very efficiently. So with they waypoint calls, you may only be getting some of the children, but the display can start populating the tree display while making additional calls for the rest. <div class=""><br class=""></div><div class="">I may have some postman examples and internal notes around somewhere: I’ll see what I can dig out. </div><div class=""><br class=""></div><div class="">— Steve. </div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 23, 2019, at 9:05 AM, Trevor Thornton <<a href="mailto:trthorn2@ncsu.edu" class="">trthorn2@ncsu.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div dir="ltr" class="">Hi everybody-<div class=""><br class=""></div><div class="">I'm building a service using these API endpoints (or I think I am):</div><div class=""><a href="http://archivesspace.github.io/archivesspace/api/#fetch-tree-information-for-the-top-level-resource-record" class="">[:GET] /repositories/:repo_id/resources/:id/tree/root</a></div><div class=""><a href="http://archivesspace.github.io/archivesspace/api/#fetch-tree-information-for-an-archival-object-record-within-a-tree" class="">[:GET] /repositories/:repo_id/resources/:id/tree/node</a></div><div class=""><br class=""></div><div class="">These incorporate the concept of "waypoints", which I admit that I'm not familiar with in this context, and it isn't explained very well in the documentation. This is what I have to work with (these are elements included in the API response):</div><div class=""><ul class=""><li class="">child_count – the number of immediate children</li><li class="">waypoints – the number of “waypoints” those children are grouped into</li><li class="">waypoint_size – the number of children in each waypoint</li><li class="">precomputed_waypoints – a collection of arrays (keyed on child URI) in the same format as returned by the ’/waypoint’ endpoint. Since a fetch for a given node is almost always followed by a fetch of the first waypoint, using the information in this structure can save a backend call.<br class=""></li></ul></div><div class="">Can anyone explain what exactly waypoints are and how they are different from children? In the examples I've seen, the "precomputed_waypoints" element in the response looks like a convoluted way (an array value of the lone element in an object, which is itself the value of the lone element in another object) to provide the children nodes of the given node (or root). What's the difference?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Trevor<br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><font size="2" style="background-color:rgb(255,255,255)" color="#666666" class="">Trevor Thornton</font><div class=""><font size="2" style="background-color:rgb(255,255,255)" color="#666666" class="">Applications Developer, Digital Library Initiatives</font></div><div class=""><font size="2" style="background-color:rgb(255,255,255)" color="#666666" class="">North Carolina State University Libraries</font></div></div></div></div></div></div></div></div></div>
_______________________________________________<br class="">Archivesspace_Users_Group mailing list<br class=""><a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" class="">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br class="">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group<br class=""></div></blockquote></div><br class=""></div></body></html>