How can I generate a list of the spaces on my Confluence Cloud site and sort that by space size?

Juan Leon March 15, 2024

The question as stated pretty much says it all. 

The context is:

I know the size of spaces when they are created from my templates.

For administrative purposes, I'd like to be able to quickly identify all spaces across the site that have had no pages or attachments added to them since their initial creation.

I hope I can be pointed to an existing report or 3rd party add-on that can provide this information--or other information that can be used to achieve the same result--distinguishing used from never-been-used spaces on my site.

Thank you for any pointers,

 

Juan

 

3 answers

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 26, 2024

@Juan Leon You can use the Site dashboard provided by the Better Content Archiving app for this.

Although this report is more focused on the content count per status values, the "Contents" column displays the total number of pages plus blogs per space:

Home-Confluence.png

(Discl. it is a paid and supported app developed by our team. Free for 10 users.)

0 votes
Jonathan Muse March 20, 2024

Hi @Juan Leon , I use the Confluence Command Line Interface (CLI) tool for this exact same thing all the time. I find it entertaining because despite working with many other admins, no one knows how I get the data and I end up needing to send the file to everyone.

I am not exactly sure what you mean by space size. I assume it means the number of pages in the space?

Getting a basic space list is pretty straight forward:

--action getSpaceList --file C:/ACLI/spacelist.csv

 As you might guess it exports the list into a CSV file with basic info like name, id, home page, and some other data.

If you are after the number of pages in each space I use something like this:

--action runFromSpaceList --common "--action getPageList --cql \"type=page AND space=@space@\" --file C:/ACLI/allPages.csv --append"

 Then, in Excel, I use a pivot table to show how many pages are under each space. It can take some time to run but I have successfully run this for a site that has 45k pages in it.

Juan Leon March 20, 2024

Hello, Jonathan.

Yes.  Space size in terms of pages would be perfect.

As for these scripts, the first one works like a charm.  It created the 'spacelist.csv' file and populated it with the attributes of my spaces.

The second script returns an error I am not sure how to debug, though:

Run: --action getPageList --cql "type=page AND space=2024Course12Wktemplate" --file C:/ACLI/allPages.csv --append

Remote error: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql :
Client error: 1 actions failed

 

Is there a syntax error that would be obvious to your more experienced eye?  Does it matter that my acli client is running on a Windows 11 PC?

 

Thanks for any light you can shed.

 

- juan

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2024

Hello @Juan Leon 

Searching the Atlassian Marketplace for "space size", filtering for Confluence Cloud, revealed this app. I have never used it.

Site statistics for Confluence

Juan Leon March 18, 2024

Thank you, Trudy.  I wasn't able to get this app to display statistics for a site as a whole, or sort by space size.

 

Suggest an answer

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

Atlassian Community Events