How to get all confluence global templates to the JIRA Administration Page webwork action using JAVA

I have a JIRA Webitem at the System Adminstration section.

On the Page, I wanted to display the list of Confluence Global Template.

Since there is no REST API's for fetching the global templates, Is there a method to fetch the global templates by using application links java object?

1 answer

1 accepted

1 vote
Accepted answer

Hi - it looks like there is a REST API in Confluence Cloud to retrieve the global templates: Get blueprint templates

Please let me know if that is helpful for your case.

If you are using Server, the API isn't documented: 

Confluence REST API Documentation

But it looks like some versions have had an experimental API you can use:

how i can get confluence templates via rest api


Thanks for Reply @Ann Worley.

Since I am using confluence version 5.6.5, i couldn't get the API. And also it is experimental, which I am not comfortable to use it.

Is there any Templates Related JAVA Class/interface/Methods, that i can use to get all the Global Templates?

Ann Worley Atlassian Team Dec 18, 2017

I understand you would like to know how to use JAVA resources to display a list of Confluence page templates in Jira. You are using Confluence 5.6.5 and are not interested in an experimental API.

I have not forgotten our thread, am following up with some developers internally but most of them are in APAC and it is a slow time of year, so it is taking a while. Thanks for your patience. 

Ann Worley Atlassian Team Dec 19, 2017

@arunkThe answer I got was that you would need to write a plugin for Confluence that provided the API then use the API in Jira. You may use:

@ComponentImport com.atlassian.confluence.pages.templates.PageTemplateManager 

to obtain the list of templates (global or space).

Thanks for the quick reply @Ann Worley, Will try your suggestion and let you know.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Dec 18, 2018 in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

472 views 3 18
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