REST API: Project Tree

This page contains general endpoints for the project tree.

For item specific endpoints, visit the pages below:


Returns complete tree structure for a given project

Request

PATH PARAMETERS

parameter

type

description

parameter

type

description

prjKey

string

project key

QUERY PARAMETERS

parameter

type

description

parameter

type

description

n

string

toggles structure numbering prefix for folder names
(0 = disabled (default), 1 = enabled)

Sample Request Path

1 https://myjirainstance.com/rest/com.easesolutions.jira.plugins.requirements/1.0/tree/ABCD?n=0

Responses

status 200 application/json Returned if successful.

Example

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 123 124 125 126 { "id":-1, "folders":[ { "name":"First", "id":56, "name_display":"First", "parent":-1, "folders":[ { "name":"Third", "id":69, "name_display":"Third", "parent":56, "folders":[ ], "issues":[ { "id":132, "issueId":10157, "key":"AN-4", "url":"http://<server-name>/browse/AN-4", "summary":"Second", "description":"Issue number 61", "icon_url":"http://<server-name>/images/icons/issuetypes/newfeature.png", "issueType":"New Feature", "position":1 }, { "id":131, "issueId":10155, "key":"AN-2", "url":"http://<server-name>/browse/AN-2", "summary":"Second", "description":"Second", "icon_url":"http://<server-name>/images/icons/issuetypes/newfeature.png", "issueType":"New Feature", "position":2 } ], "position":1 } ], "issues":[ ], "position":1 }, { "name":"Test", "id":67, "name_display":"Test", "parent":-1, "folders":[ { "name":"Second", "id":68, "name_display":"Second", "parent":67, "folders":[ ], "issues":[ { "id":127, "issueId":10155, "key":"AN-2", "url":"http://<server-name>/browse/AN-2", "summary":"Second", "description":"Second", "icon_url":"http://<server-name>/images/icons/issuetypes/newfeature.png", "issueType":"New Feature", "position":1 }, { "id":118, "issueId":10154, "key":"AN-1", "url":"http://<server-name>/browse/AN-1", "summary":"First", "description":"First issue textasd", "icon_url":"http://<server-name>/images/icons/issuetypes/newfeature.png", "issueType":"New Feature", "position":2 } ], "position":1 } ], "issues":[ ], "position":2 }, { "name":"Root", "id":75, "name_display":"Root", "parent":-1, "folders":[ ], "issues":[ ], "position":3 }, { "name":"Test", "id":70, "name_display":"Test", "parent":-1, "folders":[ ], "issues":[ ], "position":4 } ], "issues":[ ] }

status 400 Returned if there is an error while processing request.

status 401 Returned if user is not logged in.

status 403 Returned if the license is invalid or has expired or incompatible JIRA version.

Searches for project tree folders and returns detailed information for found elements

Request

PATH PARAMETERS

parameter

type

description

parameter

type

description

prjKey

string

project key

QUERY PARAMETERS

parameter

type

description

parameter

type

description

type

string

item type to search for (should be "folder")

pathSep

string

separator chars used in path (default "/")

path

string

path to search in – do not include root project folder in path

Sample Request Paths

1 https://myjirainstance.com/rest/com.easesolutions.jira.plugins.requirements/1.0/search/ABCD?type=folder&pathSep=%2F&path=Folder%20Path

Responses

status 201 application/json Returned if successful.

Example

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 { "folders":[ { "name":"First", "description":"", "id":9, "name_display":"First", "parent":-1, "folders":[ { "name":"Second", "description":"", "id":14, "name_display":"Second", "parent":9, "folders":[ ], "issues":[ ], "position":2, "hasChild":false } ], "issues":[ ], "position":3, "hasChild":true } ], "issues":[ ] }

status 400 Returned if there is an error while processing request.

status 401 Returned if user is not logged in.

status 403 Returned if the license is invalid or has expired or incompatible JIRA version.

Returns total item count for given project since 4.2.0

Request

PATH PARAMETERS

parameter

type

description

parameter

type

description

prjKey

string

project key

QUERY PARAMETERS

parameter

type

description

parameter

type

description

includePages

string

option to include pages in total count,
where default value is true. if value is set to false, only issues will be counted.

Sample Request Path

1 https://myjirainstance.com/rest/com.easesolutions.jira.plugins.requirements/1.0/tree/totalItemCount/ABCD?includePages=false

Responses

status 200 application/json Returned if successful.

Example

1 2 3 { "totalItemCount":125 }

status 400 Returned if there is an error while processing request.

status 401 Returned if user is not logged in.

status 403 Returned if the license is invalid or has expired or incompatible JIRA version.

Triggers a reuse from a source path to a destination path

Source and target may be different projects.

Request

QUERY PARAMETERS

parameter

type

description

parameter

type

description

source

string

the source folder for reuse
(e.g. Requirements Plugin/Implementation)

target

string

the target folder for the reuse
(e.g. Requirements Plugin/Features/Baseline/Permissions)

ruleName

string

the name of the predefined reuse configuration rule to be used

Sample Request Path

1 https://myjirainstance.com/rest/com.easesolutions.jira.plugins.requirements/1.0/tree/reuse?source=Requirements%20Plugin%2FImplementation&target=Requirements%20Plugin%2FFeatures%2FBaseline%2FPermissions&ruleName=Copy%20folder%20structure%20only

Responses

status 200 text/plain Returned if successful.

Example

1 Reuse Success

status 400 Returned if there is an error while processing request.

status 401 Returned if user is not logged in.

status 403 Returned if the license is invalid or has expired or incompatible JIRA version.

Creates a scheduled job to automatically import issues to specified folder

Request

PATH PARAMETERS

parameter

type

description

parameter

type

description

prjKey

string

project key

QUERY PARAMETERS

parameter

type

description

parameter

type

description

name

string

name of the scheduled job to be created

folderId

string

id of folder where issues will be imported

filter

string

JQL or JIRA filter id of issues to be imported
if value is empty, all issues from the project that do not exist in the project tree are added by default

interval

string

scheduled time interval for job (in minutes)
enter 0 as value to set execution interval to Manual.

Sample Request Paths

1 2 3 https://myjirainstance.com/rest/com.easesolutions.jira.plugins.requirements/1.0/tree/ABCD/createscheduledjob?name=Import%20bugs&folderId=382&filter=11000&interval=0 https://myjirainstance.com/rest/com.easesolutions.jira.plugins.requirements/1.0/tree/ABCD/createscheduledjob?name=Import%20bugs&folderId=382&filter=project%20%3D%20TP%20AND%20issuetype%20%3D%20bug&interval=30

Responses

status 201 text/plain Returned if successful.

Example

1 Rule {name} has been successfully created

status 400 Returned if there is an error while processing request.

status 401 Returned if user is not logged in.

status 403 Returned if the license is invalid or has expired or incompatible JIRA version.