Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I know a jira project's projectTemplateKey?

Ronaldo Huang
Contributor
November 11, 2020

I found a document: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-get which has rest api to create jira project , and projectTemplateKey in request body.
When I create a jira project by rest api, I want an existed jira project as template.
How can I know the existed jira project's projectTemplateKey?

1 answer

1 accepted

0 votes
Answer accepted
Prince Nyeche
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2020

Hi @Ronaldo Huang 

Welcome to community, I think you're referring to the shared template API.

/rest/project-templates/1.0/createshared/{projectId} 

Where ProjectId is the id of the existing project.

However that API is not official if you're using Cloud, so I wouldn't rely on it so much but you can test it to see if it works for you!

Ronaldo Huang
Contributor
November 12, 2020

Wow! It really works.

But I'm confused that why that API is not official? ^_^

Ronaldo Huang
Contributor
November 12, 2020

@Prince Nyeche 

Wow! It really works.

But I'm confused that why that API is not official? ^_^

Prince Nyeche
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2020

It's because, most of the time users wouldn't really want to create a project based of another Project from an API perspective. Likewise if the API is not documented on Atlassian developer pages it isn't official. which means it can stop working at any time without any prior notification to you the user. 

Like Ronaldo Huang likes this
Ronaldo Huang
Contributor
November 12, 2020

@Prince Nyeche 

Oh, I see. I hope it never stop working. It's useful for me. ^_^

Deleted user January 17, 2021

Hello,

@Ronaldo Huang 

Could you tell me how you made the api work and what value you put between the keys please.

Ronaldo Huang
Contributor
January 18, 2021

@[deleted] 

The request body is:

{

"key":"",

"name":"",

"projectTypeKey":"",

"lead":"",

"description":""

}

Deleted user January 18, 2021

@Ronaldo Huang 

 

The body is clear to me, in fact I can generate a project automatically, but I want to obtain the templey of my project so that when I create it, that is always used as I can obtain them.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events