Projects


Create project

Available since v. 1.10.*

Available since v. 1.23.* - Reindex project

Available ONLY for JIRA administrators

Method type - POST

URL: {JIRA_URL}/rest/extender/1.0/project/createProject

Request format - JSON

Example request

  • JSON for one project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "key":"EXAMPLEKEY", "name":"Example project name", "lead":"admin", "typeKey":"business", "templateKey":"com.atlassian.jira-core-project-templates:jira-core-project-management", "description":"Example description", "assigneeType":"PROJECT_LEAD", "categoryId":10000, "issueTypeScheme":10202, "workflowScheme":10101, "issueTypeScreenScheme":10001, "fieldConfigurationScheme":10000, "issueSecurityScheme":10000, "notificationScheme":10100, "permissionScheme":10000, "prioritiesScheme":10203 }

Parameters

  • key - required - project key

  • name - required - project name 

  • lead - required - project lead (user name, like admin

  • typeKey - required - project type -  please see Get project template informations and field projectTypeKey

  • templateKey - optional - project template key - please see Get project template informations and field projectTemplateKey - this parameter set project schemes like build in templates into JIRA when you create project

  • description - optional - project description

  • assigneeType - optional - default assignee  - please see Get project assignee type and field assigneType

  • categoryId - optional - project category id - please see https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/projectCategory

  • issueTypeScheme - optional - issue type scheme id 

  • workflowScheme - optional - workflow scheme id

  • issueTypeScreenScheme - optional - issue type screen scheme id

  • fieldConfigurationScheme - optional - field configuration scheme id

  • issueSecurityScheme - optional - issue security scheme id

  • notificationScheme - optional - notification scheme id

  • permissionScheme - optional - permission scheme id

  • prioritiesScheme - optional - priorities scheme id - this parameter works only for Jira >= 7.6.0 

Request format - JSON

Example response

1 2 3 { "message": "project was created" }
1 2 3 4 5 6 7 8 9 10 11 12 13 { "message": "project not created", "errors": [ { "errorFieldName": "key", "errorMessage": "Project 'Example project name' uses this project key." }, { "errorFieldName": "name", "errorMessage": "A project with that name already exists." } ] }

Reindex project

Available ONLY for JIRA administrators

Method type - POST

URL: {JIRA_URL}/rest/extender/1.0/project/{projectKeyOrId}/reindex

  • where {projectKeyOrId} is project key or id (10000, TEST etc.)

Example URL:

  • {JIRA_URL}/rest/extender/1.0/project/PROJECTA/reindex

  • {JIRA_URL}/rest/extender/1.0/project/12000/reindex

Response format - JSON

Example response:

  • JSON for one project

1 2 3 4 { "progressLink": "/secure/project/IndexProjectProgress.jspa?pid=10000&taskId=10100", "message": "reindex for project 'PROJECTA' has been started " }

Delete projects

Available ONLY for JIRA administrators
NOTE: If you plan delete large or multiple projects, use asynchronous option

Delete project REST available since v. 1.4.0

Asynchronous parameter available since v. 1.11.*

Method type - DELETE

URL:

  • {JIRA_URL}/rest/extender/1.0/project/deleteProject

  • {JIRA_URL}/rest/extender/1.0/project/deleteProject?asynchronous=true

Request format - JSON

  • JSON for one project

1 2 3 { "project":["PROJECT_KEY"] }
  • JSON for one project

1 2 3 { "project":["PROJECT_ID"] }
  • JSON for several projects

1 2 3 { "project":["PROJECT_KEY_1", "PROJECT_ID_1", "PROJECT_KEY_2"] }

Response format - JSON

Example response

1 2 3 4 5 6 7 { "deleted": [ "PROJECT_KEY" ], "message": "all projects deleted", "skipped": [] }
1 2 3 4 5 6 7 8 9 10 { "deleted": [ "PROJECT_KEY" ], "url": [ "/secure/project/DeleteProjectProgress.jspa?pid=10001&taskId=10001" ], "message": "all projects deleted", "skipped": [] }

Parameters

  • asynchronous - optional - boolean - if set to true, plugin deletes the project in a backgound task


Set Project Lead

Available for JIRA Administrators
Available for actual Project Lead
Available for project Administrators

Method type - PUT

URL: {JIRA_URL}/rest/extender/1.0/project/{projectKeyOrId}/setLead/{userName}

  • where {projectKeyOrId} is project key or id (10000, TEST etc.)

  • where {userName} is user (new Project Lead)

Example URL:

  • {JIRA_URL}/rest/extender/1.0/project/PROJECTA/setLead/USER1

Response format - JSON

Example response

1 2 3 { "message": "User 'USER1' is new Project Lead in 'Test Project A' project." }

Get project template informations

Available for JIRA Administrators

Available since v. 1.10.*

Method type - GET

URL: {JIRA_URL}/rest/extender/1.0/project/getProjectTemplateInformation

Response format - JSON

Example response

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "projectTemplateInformations": [ { "projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-project-management", "projectTypeKey": "business" }, { "projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-task-management", "projectTypeKey": "business" }, { "projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-process-management", "projectTypeKey": "business" } ] }

Get project assignee type

Available for JIRA Administrators

Available since v. 1.10.*

Method type - GET

URL: {JIRA_URL}/rest/extender/1.0/project/getProjectAssigneeType

Response format - JSON

Example response

1 2 3 4 5 6 7 8 9 10 11 12 { "projectAssigneTypes": [ { "description": "Assignee is set to the Project lead.", "assigneType": "PROJECT_LEAD" }, { "description": "Issue is left with no assignee.", "assigneType": "UNASSIGNED" } ] }