Cloud
Jira Cloud platform / Reference / REST API v2

Project templates

This resource represents project templates. Use it to create a new project from a custom template.

POST

Create custom projectExperimental

Creates a project based on a custom template provided in the request.

The request body should contain the project details and the capabilities that comprise the project:

  • details - represents the project details settings
  • template - represents a list of capabilities responsible for creating specific parts of a project

A capability is defined as a unit of configuration for the project you want to create.

This operation is:

  • asynchronous. Follow the Location link in the response header to determine the status of the task and use Get task to obtain subsequent updates.

Note: This API is only supported for Jira Enterprise edition.

Data Security Policy: Exempt from app access rules
Scopes
ClassicRECOMMENDED:manage:jira-configuration
Granular:write:project:jira, read:project:jira

Connect apps cannot access this REST resource.

Request

Request bodyapplication/json

The JSON payload containing the project details and capabilities

details

CustomTemplatesProjectDetails

template

CustomTemplateRequestDTO

Responses

The project creation task has been queued for execution

application/json

any

POST/rest/api/2/project-template
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; var bodyData = `{ "details": { "accessLevel": "private", "additionalProperties": {}, "assigneeType": "PROJECT_LEAD", "avatarId": 10200, "categoryId": 219, "description": "This is a project for Foo Bar", "enableComponents": false, "key": "PRJ", "language": "en", "leadAccountId": "1234567890", "name": "Project Foo Bar", "url": "https://www.example.com" }, "template": { "boards": { "boards": [ {} ] }, "field": { "customFieldDefinitions": [ {} ], "fieldLayoutScheme": {}, "fieldLayouts": [ {} ], "issueLayouts": [ {} ], "issueTypeScreenScheme": {}, "screenScheme": [ {} ], "screens": [ {} ] }, "issueType": { "issueTypeHierarchy": [ {} ], "issueTypeScheme": {}, "issueTypes": [ {} ] }, "notification": { "description": "<string>", "name": "<string>", "notificationSchemeEvents": [ {} ], "onConflict": "FAIL", "pcri": {} }, "permissionScheme": { "addAddonRole": true, "description": "<string>", "grants": [ {} ], "name": "<string>", "onConflict": "FAIL", "pcri": {} }, "project": { "fieldLayoutSchemeId": {}, "issueSecuritySchemeId": {}, "issueTypeSchemeId": {}, "issueTypeScreenSchemeId": {}, "notificationSchemeId": {}, "pcri": {}, "permissionSchemeId": {}, "projectTypeKey": "software", "workflowSchemeId": {} }, "role": { "roleToProjectActors": {}, "roles": [ {} ] }, "scope": { "type": "GLOBAL" }, "security": { "description": "Newly created issue security scheme", "name": "New Security Scheme", "pcri": {}, "securityLevels": [ {} ] }, "workflow": { "statuses": [ {} ], "workflowScheme": {}, "workflows": [ {} ] } } }`; const response = await api.asUser().requestJira(route`/rest/api/2/project-template`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: bodyData }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.text());

Rate this page: