Creating Projects via REST API in Jira Server and Data Center
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Issue:
Currently the REST API Manual is missing the complete list of projectTemplateKeys and projectTypeKeys, which are necessary in order to create all the possible project types in Jira, they fall in to three main categories:
Software
Core
Service Management
Below you will find a complete list of these and examples of each.
List of projectTypeKey and corresponding projectTemplateKey(s).
Jira SOFTWARE Projects:
projectTypeKey = software
projectTemplateKey(s):
Scrum: "com.pyxis.greenhopper.jira:gh-scrum-template"
Kanban: "com.pyxis.greenhopper.jira:gh-kanban-template"
Basic: "com.pyxis.greenhopper.jira:basic-software-development-template"
Example of API call to create a software project:
curl -X POST \
http://<yourJiraurl>/rest/api/2/project \
-H 'Authorization: Basic cm9ubmllOlRhdGVyYnVnMTIj' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"key": "SOF",
"name": "Software Sample",
"projectTypeKey": "software",
"projectTemplateKey": "com.pyxis.greenhopper.jira:gh-scrum-template",
"description": "Example Project description",
"lead": "ronnie",
"assigneeType": "PROJECT_LEAD",
"avatarId": 10200
}'
As per the REST API documentation if " issueSecurityScheme ": , " permissionScheme ": or " notificationScheme ": are not specified, the defaults will be utilized.
In order to create a Kanban or basic type software project we'd just change the "projectTemplateKey" to the appropriate type as listed above.
Jira CORE or BUSINESS type Projects:
projectTypeKey = business
projectTemplateKey(s):
Project Management: "com.atlassian.jira-core-project-templates:jira-core-project-management"
Task Management: "com.atlassian.jira-core-project-templates:jira-core-task-management"
Process Management: "com.atlassian.jira-core-project-templates:jira-core-process-management"
Example of API call to create a core/business project:
curl -X POST \
http://<yourJiraurl>/rest/api/2/project \
-H 'Authorization: Basic cm9ubmllOlRhdGVyYnVnMTIj' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"key": "BUS",
"name": "Business Sample",
"projectTypeKey": "business",
"projectTemplateKey": "com.pyxis.greenhopper.jira:gh-scrum-template",
"description": "Example Project description",
"lead": "ronnie",
"assigneeType": "PROJECT_LEAD",
"avatarId": 10200
}'
Jira Service Management type Projects:
projectTypeKey = service_desk
projectTemplateKey(s):
Basic: "com.atlassian.servicedesk:basic-service-desk-project"
IT Service Management: "com.atlassian.servicedesk:itil-v2-service-desk-project"
Customer Service: "com.atlassian.servicedesk:customer-service-desk-project"
Example of API call to create a service management project:
curl -X POST \
http://<yourJiraurl>/rest/api/2/project \
-H 'Authorization: Basic cm9ubmllOlRhdGVyYnVnMTIj' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d '{
"key": "JSD",
"name": "JSD Sample",
"projectTypeKey": "service_desk",
"projectTemplateKey": "com.atlassian.servicedesk:itil-v2-service-desk-project",
"description": "Example Project description",
"lead": "ronnie",
"assigneeType": "PROJECT_LEAD",
"avatarId": 10200
}'
Related links
https://docs.atlassian.com/software/jira/docs/api/REST/8.22.4/#project-createProject