I'm not quite sure what you're looking for here, so I expect this answer to be inadequate in itself, but hopefully you can point at it and explain what it does not do that you need.
Have you tried the pagetree macro? You get the structure of nested pages laid out for you in there. It doesn't go above a space level, but you can imagine a simple flat "every space is one branch under Confluence" for that part.
Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs