Creating Pages from Blueprints in Confluence from JIRA Post Function

I've got a script that's working to create a confluence page where I want it, but I'm unable to create anything but a blank page (with whatever text I add to the script). Is it possible to create a page from a specific blueprint that I've created for my Space?

I think this is the code you're looking for:

// set the page title - this should be unique in the space or page creation will fail
def pageTitle = issue.key + " - CES Information"
def pageBody = ""
def params = [
    type: "page",
    //id: "11599873",
    title: pageTitle,
    space: [
        key: "PPM" // set the space key - or calculate it from the project or something
    ],
        ancestors: [
        [
           type: "page",
           id: "10977287",
       ]
     ],
    body: [
        storage: [ value: writer.toString(), representation: "storage" ]
    
    ]
]

I've tried a bunch of different things besides "page" and nothing seems to do the trick (the blueprint ID is commented out).

Any direction would be appreciated!

 

1 answer

No, the blueprints are not attached to a great API right now.

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 Friday 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...

274 views 11 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