I'm trying to use the jira API's to create a project with a custom project template for the "projectTemplateKey" key.
The only thing I have to go on is the following links.
https://community.atlassian.com/t5/Answers-Developer-Questions/Create-a-project-template-in-JIRA-and-use-this-project-template/qaq-p/468079 https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/project-createProject
// This is the only reference i've found to the jira project tempalte: https://docs.atlassian.com/software/jira/docs/api/7.0.7/com/atlassian/jira/project/template/ProjectTemplateManager.html
Using the following bit of code to create the project.
curl --request POST \
--url 'https://{HOST}/rest/api/3/project' \
--user '{EMAIL}:{API_KEY}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "project-name",
"description": "project-desc",
"leadAccountId": "{LEAD_ACCOUNT_ID}",
"url": "http://google.com",
"projectTemplateKey": "{I_NEED_THIS-HOW_DO_I_GET_IT}",
"assigneeType": "PROJECT_LEAD",
"key": "LKEY",
"projectTypeKey": "software"
}'
@[deleted] , the list of available project template keys are in https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-post
Are you looking to create a new custom template? If yes, i don't think that is possible anymore.
You could however create projects with shared schemes of another project.
Im trying to create a project with the API but with shared project template / scheme / issues etc. But in the project API, I cant seem to find a way to get a list of templates to provide to the "projectTemplateKey"param.
And I cant seem to find any reference anywhere to the identifier of the template from the interface
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Like i mentioned in my answer, there is no custom projectTemplateKey at the moment.
You will have to use from the list available in https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-post
Screenshot from the above link
From REST API, it is also not possible to create projects with shared configuration from another project. Refer to the below open request for the same
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This question comes up from time to time. The REST API is currently unable to lookup and return a list of projectTemplateKeys, you have to manually provide the value.
Read this article to know what the values for the projectTemplateKey can be.
Vote on this issue if you think getting the projectTemplateKey is something that should be added to the REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And also this issue looks like a duplicate to vote on adding this to the REST API for Jira Server:
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.