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

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

Create new Project via REST based on existing Project

Hallo,

since it is now possible to create a new JIRA Project via REST (JRA-27256) and it is now (Version 7.1) possible to create a new Project based on an existing Project via the GUI, with all the Shemes of the existing Project.

I want to know if it is possible to use this Feature over REST? So create a new Project based on an existing Project over REST? If yes what do i give the REST API as projectTemplateKey to reference this existing Project?

Thanks

5 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

Hi,

As part of the creation process via the web interfaces, a undocumented REST API is called

POST /rest/project-templates/1.0/createshared/{0}

Where {0} is the numeric id of the project to clone.

A JSON body should be provided with the following information:

{
    "key": "THEKEY",
    "name": "The name of the new awesome project",
    "lead": "lead.username"
}

 

Works on JIRA 7.2.3

 

Hope that could help

Thank you! I am using this in my current project, and it's invaluable as a time saver.

Are there methods to find other undocumented APIs like this one?

Yes, there is.

Best is to execute the action with the UI and see which services are called.

I did that by using the Dev tools available in Chrome.

 

Hope it helps.

Like Yatish Madhav likes this

Yes, it helps greatly!

Thanks for pointing out that their UI is using the same REST as the rest of us, now I can manually inspect what's going on and extract the undocumented calls that I'm needing.

HI, thank you for the API call provided but when i use the code im not getting any error nor the project is not created 

the response state code is OK 

Any help would be appreciated 

My Problem statement

Create JIRA Project with shared configuration 

Create Crowd Group

Mapping Crowd groups to Jira Project with specific roles

 

Thanks 

Still works 8.2 Thanks for this, super helpful!

Please upvote this answer as it's the most correct for OP's question :) 

Hi Michael,

You can do this with Configuration Manager for JIRA. CMJ has a REST API and you can use it to create a snapshot on a project (or a set of projects) that will include all their related configuration objects. The snapshot can be then deployed on the current or any other JIRA.

If you have further questions or would like a demo drop us an email at sales@botronsoft.com. 

Cheers!

Hi George,

is a cloud solution foreseen?

Thanks!

Hi Tanguy,

Unfortunately not in the near future. In the long run probably yes.

A price point more than double  of Jira's base price point... **Spits drink out all over screen**

Correct and working answer below by François Karman. This works for 8.2 currently.  Please upvote below to remove a expensive marketplace item from top spot that does something we can already do via API call as OP requested. 

Can anyone please suggest and Rest API for clone project ?

0 votes
francis Marketplace Partner Jun 12, 2016

It looks like that the current REST Api is missing the necessary calls to set the workflow, field configuration, issue type screen and issue type scheme, unless your new project can be created from the default configuration, there will be some coding work required.

This can be done by implementing an add-on or create a script runner based end-point - check https://scriptrunner.adaptavist.com/latest/jira/rest-endpoints.html

The script runner has also implemented a built-in script to copy a project.  The jar contains the source code to get it all done.   I guess @Jamie Echlin [Adaptavist] might have some additional insights.

 

Francis

 

 

Hi All,

I understand that the new projects CANNOT be created / cloned via REST in the CLOUD instances of Jira. Could you please let us know if this is still correct or CLOUD can now support the cloning / creation of new projects using REST Api based on the existing projects.

Like Eugene Yasyuchenko likes this

Hello @Michael Weilbuchner, I am also interested in an answer to your question!

Thanks

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
Community showcase
Posted in Trello

Taco Tuesday: Your favorite Trello blog takeaway

Hello friends! From the community that brought you Welcome Wednesday, Throwback Thursday and Friday Fun, welcome to Taco Tuesday, a weekly discussion about all things Trello. The best part? One Tac...

109 views 6 6
Join discussion

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