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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to create a project based on a project template

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"
}'

1 answer

0 votes
Fazila Ashraf Community Leader Sep 22, 2020

@Ryan Cooke  , 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

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 linkimage.png

 

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

https://jira.atlassian.com/browse/JRASERVER-45929

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.

And also this issue looks like a duplicate to vote on adding this to the REST API for Jira Server:

https://jira.atlassian.com/browse/JRASERVER-66918

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

148 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you