How to create project with shared Configuration via REST API Edited

Hi!

We need create JIRA projects via API, but we don't want create new schemes to each project created, we want create project using existing schemes.

We need to do via API the same happens when we use the option "Create With Shared Configuration" in create project screen.

Is that possible?

2 answers

This widget could not be displayed.

Hi Sergio, I was looking for this too, and came across a solution on https://jira.atlassian.com/browse/JRASERVER-27256. As Andry said there, you can use the endpoint:

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

with the JSON:

{"key":"NEWPRJ","name":"Test Project created with shared configuration with TMPLPRJ","lead":"user1"}

where {projectId} is the ID of the project whose configuration you are using. Since this is not documented it is not a formally supported endpoint, but it worked for me. Hope that helps!

Hello Alex, I've been trying to use this endpoint but without success, can you confirm that it still works?

Hi Lucas, 

Are you trying with the project key instead of the project ID in the endpoint?

The project key is what precedes the ticket number (such as JRASERVER in the above post) whereas the project ID is what you see when you try to delete a project and observe the five-digit number after pid= in the url.

This widget could not be displayed.
Josh Steckler Community Champion Oct 04, 2017

Hello Sergio,

I want the same, but this isn't possible today with the REST API. The only way I am aware of to do this programatically is with the Jira CLI addon https://bobswift.atlassian.net/wiki/spaces/JCLI/pages/266178329/Actions#Actions-createProject

Alex Gallien Atlassian Team Oct 14, 2017

Hey Josh, if you're still looking for this I figured out a way to do it from the comments on  https://jira.atlassian.com/browse/JRASERVER-27256. See my other response below for more details!

Josh Steckler Community Champion Oct 19, 2017

Cool - I was only aware of the POST /rest/api/2/project endpoint which doesn't allow setting workflow scheme etc.

Time to automate :)

Thanks!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

79 views 1 0
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you