Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

arunk December 13, 2017

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
Answer accepted
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 14, 2017

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

 

arunk December 14, 2017

Thanks for Reply @AnnWorley.

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?

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 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. 

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 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).

arunk December 23, 2017

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events