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

{ "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

{ "message": "project was created" }
{ "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

 


Delete projects

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

  • JSON for one project

  • JSON for several projects

Response format - JSON

Example response

Parameters

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

 


Set Project Lead

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

 


Get project template informations

Method type - GET

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

Response format - JSON

Example response

 


Get project assignee type

Method type - GET

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

Response format - JSON

Example response

 


Get projects with an inactive lead

Method type - GET

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

Example URL:

  • {JIRA_URL}/rest/extender/1.0/project/getProjectsWithInactiveLead?startAt=10&maxResults=20

  • {JIRA_URL}/rest/extender/1.0/project/getProjectsWithInactiveLead?maxResults=1000

Response format - JSON

Example response

 


Pagination

This REST API uses pagination to improve performance for all users. Pagination is enforced for methods that could return a large collection of items. When you make a request to a paged API, the response will wrap the returned array of values in a JSON object with paging metadata, for example:

Where:

  • startAt is the index of the first item returned in the page of results.

  • maxResults is the maximum number of items that can be returned per page. Each API endpoint may have a different limit for the number of items returned, and these limits may change without notice. (default value - 1000)

  • total is the total number of items contained in all pages. This number may change as the client requests the subsequent pages, therefore the client should always assume that the requested page can be empty.