- Created by Angelica Salazar, last modified on Feb 28, 2020
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 8 Current »
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 |
---|---|---|
prjKey | string | project key |
QUERY PARAMETERS
parameter | type | description |
---|---|---|
n | string | toggles structure numbering prefix for folder names |
Sample Request Path
https://myjirainstance.com/rest/com.easesolutions.jira.plugins.requirements/1.0/tree/ABCD?n=0
Responses
STATUS 200 application/json Returned if successful.
Example
{ "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 |
---|---|---|
prjKey | string | project key |
QUERY PARAMETERS
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 |
Sample Request Paths
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
{ "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 |
---|---|---|
prjKey | string | project key |
QUERY PARAMETERS
parameter | type | description |
---|---|---|
includePages | string | option to include pages in total count, |
Sample Request Path
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
{ "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 |
---|---|---|
source | string | the source folder for reuse |
target | string | the target folder for the reuse |
ruleName | string | the name of the predefined reuse configuration rule to be used |
Sample Request Path
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
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 |
---|---|---|
prjKey | string | project key |
QUERY PARAMETERS
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 |
interval | string | scheduled time interval for job (in minutes) |
Sample Request Paths
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
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.
- No labels