Can I get all the pages created by target user?

Can I get all the pages created by target user? Or, how to list their own contens?

This is because whe have these situation that someone need to move all the his / her contents to another space.

2 answers

1 accepted

Thank you so much for your reference. Since this is my first question that I'm really glad to read your feedback.

Hi Akiko,

You can have this information through some simple SQL queries, like:

SELECT contentid,title,(SELECT spacename FROM spaces WHERE spaceid=content.spaceid) AS space FROM content WHERE parentid IS NULL AND contenttype = 'PAGE' AND creator = (SELECT user_key FROM user_mapping WHERE username = 'username');

If you also want to look for blogposts, you can search it this way:

SELECT contentid,title,(SELECT spacename FROM spaces WHERE spaceid=content.spaceid) AS space FROM content WHERE parentid IS NULL AND contenttype in ('PAGE','BLOGPOST') AND creator = (SELECT user_key FROM user_mapping WHERE username = 'username');

Best regards,

Felipe Alencastro

Hello, Felipe.

Thank you so much above SQL code. This is quite helpful for me because I also manage and can access to our confluence DB.

And above works fine, the results contains not only the latest pages but also older versions.

Thanks again for all above answers and this Q&A platform!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,990 views 25 10
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you