In the content manager, we can see publications blueprinting hierarchy. When we right-click on publication, select blueprinting -> blueprinting hierarchy, we can see publications by levels in the popup.

Is there a way to do this via CoreService? Or I need to read the list of publications, and then use information about their parents and build a tree by myself?