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

This widget could not be displayed.

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

This widget could not be displayed.
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
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

462 views 6 6
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