It was a challenge to create a project in Jira cloud from a template project by using Rest API's. After doing some research , I found some hidden API's and here is a way how you can use those API's and can create the project.
By following below api's you can achieve following.
Create a project from template
This API will create a project with shared settings same as in existing project.
Request URL: https://yourinstance.atlassian.net/rest/simplified/latest/project/shared
Request Method: POST
{"name": "newproject name", "key": "newprojectkey", "existingProjectId":"10000"}
Copy the agile board
This api will copy the agile board , which you can associate later on with newly created project
Request URL: https://yourinstance.atlassian.net/rest/greenhopper/1.0/rapidview/<boardid>/copy
Request Method: PUT
Change the project location of the board
This api will change the board location which is the newly created project name
Request URL: https://yourinstance.atlassian.net/rest/greenhopper/1.0/rapidviewconfig/boardLocation
Request Method: PUT
{rapidViewId: boardid, locationType: "project", locationId: "destination project id"}
Create the Board Filter
This api will create the filter for the new board which you recently copied
Request URL: https://yourinstance.atlassian.net/rest/api/3/filter
Request Method: POST
{
"jql": "filter query",
"name": "filter name",
"description": "filter description"
}
Change the board filter
This api will help you to change the filter which you created above for the copied board
Request URL: https://yourinstance.atlassian.net/rest/greenhopper/1.0/rapidviewconfig/filter
Request Method: PUT
{"id": boardid, "savedFilterId": "saved filter id"}
Rename the board name
This api will help you to rename the board name
Request URL: https://yourinstance.atlassian.net/rest/greenhopper/1.0/rapidviewconfig/name
Request Method: PUT
{"id": boardid, name: "new name"}
We are done here, Please feel free to add your remarks for any improvement.
My blog reference for the actual post:
Create a project from template
This API will create a project with shared settings same as in existing project.
Request URL: https://yourinstance.atlassian.net/rest/simplified/latest/project/shared
Request Method: POST
{"name": "newproject name", "key": "newprojectkey", "existingProjectId":"10000"}
Copy the agile board
This api will copy the agile board , which you can associate later on with newly created project
Request URL: https://yourinstance.atlassian.net/rest/greenhopper/1.0/rapidview/<boardid>/copy
Request Method: PUT
Change the project location of the board
This api will change the board location which is the newly created project name
Request URL: https://yourinstance.atlassian.net/rest/greenhopper/1.0/rapidviewconfig/boardLocation
Request Method: PUT
{rapidViewId: boardid, locationType: "project", locationId: "destination project id"}
Create the Board Filter
This api will create the filter for the new board which you recently copied
Request URL: https://yourinstance.atlassian.net/rest/api/3/filter
Request Method: POST
{
"jql": "filter query",
"name": "filter name",
"description": "filter description"
}
Change the board filter
This api will help you to change the filter which you created above for the copied board
Request URL: https://yourinstance.atlassian.net/rest/greenhopper/1.0/rapidviewconfig/filter
Request Method: PUT
{"id": boardid, "savedFilterId": "saved filter id"}
Rename the board name
This api will help you to rename the board name
Request URL: https://yourinstance.atlassian.net/rest/greenhopper/1.0/rapidviewconfig/name
Request Method: PUT
{"id": boardid, name: "new name"}
We are done here, Please feel free to add you
Create a project from template
This API will create a project with shared settings same as in existing project.
Request URL: https://yourinstance.atlassian.net/rest/simplified/latest/project/shared
Request Method: POST
{"name": "newproject name", "key": "newprojectkey", "existingProjectId":"10000"}
Copy the agile board
This api will copy the agile board , which you can associate later on with newly created project
Request URL: https://yourinstance.atlassian.net/rest/greenhopper/1.0/rapidview/<boardid>/copy
Request Method: PUT
Change the project location of the board
This api will change the board location which is the newly created project name
Request URL: https://yourinstance.atlassian.net/rest/greenhopper/1.0/rapidviewconfig/boardLocation
Request Method: PUT
{rapidViewId: boardid, locationType: "project", locationId: "destination project id"}
Create the Board Filter
This api will create the filter for the new board which you recently copied
Request URL: https://yourinstance.atlassian.net/rest/api/3/filter
Request Method: POST
{
"jql": "filter query",
"name": "filter name",
"description": "filter description"
}
Change the board filter
This api will help you to change the filter which you created above for the copied board
Request URL: https://yourinstance.atlassian.net/rest/greenhopper/1.0/rapidviewconfig/filter
Request Method: PUT
{"id": boardid, "savedFilterId": "saved filter id"}
Rename the board name
This api will help you to rename the board name
Request URL: https://yourinstance.atlassian.net/rest/greenhopper/1.0/rapidviewconfig/name
Request Method: PUT
{"id": boardid, name: "new name"}
We are done here, Please feel free to add your remarks for any improvement.
My blog reference for original post:
https://www.techclimbs.com/2021/05/jira-cloud-create-project-with-shared.html
Muhammad Ramzan_Atlassian Certified Master_
Senior Atlassian Consultant (Atlassian Certified Master)
Toronto
52 accepted answers
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.
2 comments