Get list of content from spaces by Space category using CQL

Patrice Champet
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.
December 9, 2024

Hello,

I am trying to get the content from several spaces on Confluence Cloud by space category using CQL.

It seems not available right now to filter by space category on Confluence Cloud.

Do you have any idea how to achieve it ?

Thanks !

 

2 answers

1 vote
David Freitez
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.
December 9, 2024

Hi @Patrice Champet ,

I checked Confluence documentation in Cloud  and there is no reference for the Space category while it does exist on Server version

Unfortunately, when I tried the server keyword in cloud, it didn't work.

An alternative is to Use labels to categorize spaces and use the CQL Label filter to query the pages.

I hope this answers your question,

Regards,
David

Patrice Champet
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.
December 9, 2024

Hi @David Freitez 

Thanks for your answer.

To my understanding, Labels are to be used on content level, wich means add labels on each content of a specific space instead of categorize the whole space.

@Tom_Carrott_Adaptavist , the use case is to be able to create a connector for an AI tool and get the content from specific spaces, especially certified for this use case.
Being able to add a category on the space sounds like a good move, but it seems that their is no way to get the data using CQL (exemple: space.category = ai-certified).

The only other solution if have in mind is to add a label automatically on each spaces from the category.
But I don't find how to get the space category in automation as well in order to automatise this. 


Like Tom_Carrott_Adaptavist likes this
Barbara Szczesniak
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.
December 9, 2024

@Patrice Champet If you look at the Use labels to categorize spaces page that @David Freitez linked to, it explains how to apply a label to a space (in Space settings > Space details).

You can use the Spaces List macro to retrieve a list of the spaces matching the category label.

How you could use this to retrieve the content of each space to feed to your AI, I don't know (I don't have Premium, so I don't use automation). I did a search and found this post that might help you (https://community.atlassian.com/t5/Automation-questions/Extracting-content-from-Confluence-Page/qaq-p/2550307). It's from about a year ago, so maybe the features have changed since then. You might want to do your own searches in the Confluence questions/articles community area.

0 votes
Tom_Carrott_Adaptavist
Atlassian Partner
December 9, 2024

Hi @Patrice Champet 

What kind of content from these spaces are you trying to retrieve? It would be helpful to understand your use case here.

I think the suggestion above from David is valid and could be a viable option for your needs. 

Alternatively I wondered if you've considered a third party application for your needs? Our recently developed application Panorama for Confluence could help you potentially. 

With Panorama, you can:

✅ Get a comprehensive, unified view of all your spaces and content
✅ Easily sort, filter, move, archive, delete, and make updates across multiple spaces
✅ Manage labels, permissions, and page ownership in one convenient location
✅ Streamline your workflow by consolidating several tools into a single solution, saving time and money

Feel free to reach out if you’d like more details or have any questions—I’d be happy to connect and chat further!

Thanks,
Tom

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