Creating Projects via REST API in Jira Server and Data Center

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および 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:

ソフトウェア

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

(warning) 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
 }'


関連リンク

https://docs.atlassian.com/software/jira/docs/api/REST/8.22.4/#project-createProject



最終更新日 2024 年 11 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.