How to create confluence space automatically with blueprints?

Vaasanthi I'm New Here Jan 12, 2018

We want to create confluence space automatically and the below code works fine. How to specify blueprint (Documentation space/knowledge space/Team space) type here  so that space is created based on the blueprint type?  

def UserAccessor userAccessor = (UserAccessor) ContainerManager.getComponent("userAccessor")

SpaceManager spaceManager = (SpaceManager) ContainerManager.getComponent("spaceManager")

List<Space> allSpaces = spaceManager.getAllSpaces();


spaceManager.createSpace("AAA","Example space","This is an example",tmp_id)



2 answers

Hi Vaasanthi,

I am not a developer in nature and I am also trying to figure out if i can create a page where users can request/create new spaces automatically.  Can you please help and give some direction if that is what you did?



0 vote
Usman Khalid Atlassian Team Mar 08, 2018

Hi @Vaasanthi, There's an option of "Space Blueprints" within the Create space dialog. It creates a space with a customized homepage and sometimes include sample pages too.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

372 views 20 10
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you