Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

confluence page list

Hsu Yao Chang
Contributor
August 24, 2019

Dear Support Team,

How can we use sql command to list pages title list by space? Thanks a lot.

2 answers

1 vote
Ilya Turov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 24, 2019

hello, you can use something like

SELECT c.contentid, c.contenttype, c.title
FROM CONTENT c
JOIN SPACES s
ON c.spaceid = s.spaceid
WHERE c.prevver IS NULL and s.spacename = 'your space name'

I don't have access to db atm, but believe it should work

"c.prevver is NULL" is used to get only actual versions of pages, also it should get you all contenttype, so you can add condition for it yourself

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2019

You should also filter on CONTENT_STATUS to not get deleted page. Also, if you've set up your Confluence database according to their best practices then it might also be case sensitive collation. So, you would need to do something like this.

SELECT C.CONTENTID, C.CONTENTTYPE, C.TITLE
FROM CONTENT C
INNER JOIN SPACES S ON C.SPACEID = S.SPACEID
WHERE C.PREVVER IS NULL and C.CONTENT_STATUS= 'current' and C.CONTENTTYPE = 'PAGE' and S.SPACENAME = 'your space name'
Like • Ilya Turov likes this
0 votes
Ollie Guan
Community Champion
August 24, 2019

Hello @Hsu Yao Chang ,

Have you tried other methods, such as using ‘Page Tree’ Macro?

QQ截图20190824201839.png

Hsu Yao Chang
Contributor
August 24, 2019

Thanks a lot. I know the method, but because I would like to join other table to filter other result. Is the other suggestion , such as sql command ?

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events