Forums

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

List of all pages in Space with labels assigned

Janet Dixon
Contributor
August 18, 2021

On Confluence Cloud.  I would like to create a page that lists ALL pages in a space and shows what labels are on each page.  The list should include each page name and all of the labels applied to the page.  If a page has no labels, the page would still be included in the list, but no labels would appear.  I want to be able to have space managers view a single list of all the pages in their space and know what labels each page has or if a page has no labels.

1 answer

1 accepted

0 votes
Answer accepted
Kishan Sharma
Community Champion
August 18, 2021

Hi @Janet Dixon There's no straight forward way of doing this as far as I know. You might need to do it programatically using REST API. Refer the documentation here.

You can use below endpoint to return all pages with their labels - (replace your site name/spacekey)

https://yoursite.atlassian.net/wiki/rest/api/content?spacekey=<spacekey>&expand=metadata.labels

Then you can parse the results and show it as an html on a confluence page.

Janet Dixon
Contributor
August 19, 2021

Thanks!  I'll try that.

Janet Dixon
Contributor
August 20, 2021

@Kishan SharmaI actually just found an easier way to do this that works perfect.  I installed the add-on CQL Search, which is free:  https://marketplace.atlassian.com/apps/1213090/cql-search?hosting=cloud&tab=overview

I then used the CQL Query macro, checked boxes for the items I wanted to display, one of which was a labels column, and set the query for all pages in a specified space:

space=spacekey and type=page

I now have a page with a beautiful list of all the pages in the space with their respective labels, whether they have a label or not.  Now I can see all the pages that have no labels and what labels are applied to the other pages.  Now if I could only get them to display and be organized in a page tree format.  That challenge, if it's possible, is for another day!

I think this is the easiest solution for people wanting to display a list of pages with no labels or all labels in order to manage labels throughout the system.

Like Kishan Sharma likes this
Kishan Sharma
Community Champion
August 20, 2021

Thats great @Janet Dixon thank you for sharing :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events