Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,994
Community Members
 
Community Events
165
Community Groups

SQL help needed: List all spaces with description and categories(labels?).

Hi!

I want to get all spaces with description and categories. I see some categories in AO_54C900_SPACE_BLUEPRINT_AO, but they are standart. How can i see custom categories? And how i can see description about spaces? 

 

I look they on Space Directory.

1 answer

1 accepted

Try this:

SELECT S.SpaceKey, L.Name "Type", BC.Body "Description"
FROM SPACES S, CONTENT C, CONTENT_LABEL CL, LABEL L, BODYCONTENT BC
WHERE S.SpaceID=C.SpaceID
AND C.ContentID=CL.ContentID
AND BC.ContentID=C.ContentID
AND CL.LabelID=L.LabelID
AND L.Namespace ='team'

Amaaaaazing! thx you sooo much!

This query is almost what I'm after.  It only lists sites that have a category and description.  How can the query be modified to list all sites and include the category and description if available?

@ITS Support . This should work

select s.spaceid, s.spacekey, s.spacename ,bc.bodydescription,l.name category
from spaces s
left join content c on c.spaceid = s.spaceid and c.contenttype = 'SPACEDESCRIPTION'
left join bodycontent bc on bc.contentid = c.contentid
left join content_label cl on cl.contentid = c.contentid
left join label l on l.labelid = cl.labelid

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

335 views 2 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you