Scriptrunner on JIRA Cloud - Creating Confluence Page on Post Function Edited

Hi Everyone,

I'm using ScriptRunner on JIRA Cloud and Confluence Cloud.

Is it possible to create a confluence page as the initiating user using ScriptRunner's post function script?

 

I tried posting to /wiki/rest/api/content/ and am getting a 403.  Would like to avoid putting credentials in my script.

put("/wiki/rest/api/content")
.header("Content-Type", "application/json")
.body(params)
.asString()

params is just my json array

{
  "type": "page",
"title": "Autogenerated Page", "space": {"key":"SANDBOX"}, "body": { "storage": { "value": "<p>Hello world!</p>", "representation": "storage" } } }

Thanks!

1 answer

1 accepted

This widget could not be displayed.

Hi Randy,

First, thanks for using ScriptRunner for JIRA Cloud.

Right now we don't have Confluence support. Our plan is to launch ScriptRunner for Confluence Cloud but we have no launch date.

We are also working on a way to store encrypted variables to inject into scripts so they are not stored in the clear anywhere. We have the backend implemented and the frontend will be coming shortly. The purpose of the feature is to allow script authors to use credentials or API keys without them being in the clear anywhere. Realistically this feature will not be ready for a few weeks so the best I can suggest is hard coding credentials for now and then resetting them and updating once we launch the feature, or waiting until we launch.

Regards,

Jon

Thanks Jon.

Those upcoming features look like what we'll need to accomplish this.  We'll probably hold off automating this part of our workflow until after you release.

Looking for any beta testers? ;)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

524 views 3 19
Read article

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