How to create a confluence page using a template from jira via REST API Edited

In case we have a template in confluence and want to create the page using the template then how should the template be passed in the API call?

Also how can I copy the URL of the page inside the JIRA ticket(maybe in description)? so that user can access the page directly from JIRA after it is created.

 

Thanks:)

3 answers

1 accepted

Accepted Answer
0 votes

I was able to figure this out. You need to pass the template as an inline xml within html inside pageBody parameter. It worked for me. I wish there was a structured way of doing this but this is working for me as of now !

@Bhupesh Nagda

Can you post your example code man?

Hi,

For me it's a huge line of code, maybe you can mention where you are stuck or need help.

This documentation is helpful.

[link|https://scriptrunner.adaptavist.com/latest/jira/interacting-with-confluence-from-jira.html]

 

BR,

Bhupesh

0 votes

Hell Bhupesh!

You sir, need to look at our documentation!

As you can see this is covered in this article!

Hope that read helps you out. If it doesn't, let me know.

Cheers!

DYelamos

@Bhupesh Nagda, can you post your solutions here please, for the sake of other people.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Thursday in Marketplace Apps

You + one app + a desert island...

Hi all! My name is Miles and I work on the Marketplace team. We’re looking for better ways to recommend and suggest apps that are truly crowd favorites, so of course we wanted to poll the Community. ...

935 views 4 5
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