How to find total pages & blogposts in each space and public facing spaces (anonymous access)?

Still need help?

The Atlassian Community is here for you.

Ask the community

Purpose

  • To find total pages & blogpost in each space
  • To find which space is public facing (anonymous access) and the total pages/blogpots in that space.

Solution

  • Total pages & blogpost in each space
    (info) This doesn't include drafts or previous versions.

    select s.SPACENAME,s.SPACEKEY,c.CONTENTTYPE, count(*) as Total
    from content c join spaces s on c.SPACEID=s.SPACEID 
    where c.CONTENTTYPE in ("PAGE","BLOGPOST") AND c.PREVVER is NULL 
    group by s.SPACENAME,c.CONTENTTYPE order by Total desc
  • Total pages & blogpost in each public facing space (anonymous access)
    (warning) This doesn't include pages/blogs that the permissions (viewing) are specifically restricted 

    select s.SPACENAME,s.SPACEKEY,c.CONTENTTYPE, count(*) as Total 
    from content c join spaces s on c.SPACEID=s.SPACEID 
    where c.CONTENTTYPE in ("PAGE","BLOGPOST") AND c.PREVVER is NULL AND s.SPACEKEY in 
    (select s.SPACEKEY from spaces s join spacepermissions sp on s.SPACEID=sp.SPACEID where PERMTYPE="VIEWSPACE" AND PERMGROUPNAME is NULL AND PERMUSERNAME is NULL) 
    group by s.SPACENAME,c.CONTENTTYPE 
    ORDER by Total desc

 

 

Last modified on Aug 19, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.