How to create confluence space automatically with blueprints?

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?

Thanks!

Bryan

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

910 views 23 12
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