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

0 votes
Accepted answer

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 Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,268 views 0 8
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