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?
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!
Wow! It really works.
But I'm confused that why that API is not official? ^_^
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, I see. I hope it never stop working. It's useful for me. ^_^
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Could you tell me how you made the api work and what value you put between the keys please.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[deleted]
The request body is:
{
"key":"",
"name":"",
"projectTypeKey":"",
"lead":"",
"description":""
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.