add a getchildren api call

getchildren returns the functions that are in a toplevel api