Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Help requested to construct an SQL query (page hierarchy) for Confluence.

I have read only access to our confluence database, and I'm trying to understand the schema.

a) Is there some good documentation on the schema out there / worked examples etc?

b) I have 1 specific query I need to write, which is to be able to pull a "page tree" out for a defined spacekey.

i.e a hierarchical list of the page titles. their "indent level", and permalinks, associated labels and any other page properties I can find.


A starter would be much appreciated.


1 answer

0 votes
Taranjeet Singh Community Leader Apr 26, 2019

@Graham Foster See if this documentation about Confluence database model helps you:


I also have link to this Confluence database schema pdf , for Confluence v6.x, which may be useful:

Thanks for the starter on this.

I don't suppose you can explain why all the weirdly named table prefixes can you (e..g AO_26DB7F) Are they in some way linked to tables used by plugin's perhaps? Is there a way of figuring out which plugin uses which tables? (like I'm interested in Scroll Versions as a plugin, as I suspect that the "permalinks" for their page identifiers must be held somewhere (but I can't find them!)


Taranjeet Singh Community Leader Apr 26, 2019

Yes, the tables starting with prefixes like "AO..." belong to the plugins. I am not sure though which plugins they belong to ; you can search for each table name online, and you will come to know.

If you are looking for where page metadata like page IDs and their versions are stored, they are stored in "content" table.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

63 views 0 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you