This page describes resources with which you can list, create, read, update, and delete structures. Structures contain general information such as name and permissions, but not the hierarchy itself. Issue hierarchy is accessed through the Forest Resource. This page also documents structure shape and its fields, and the error entity that may be returned in case of the REST API user error.
Structure resource belongs to version 2.0 of the API.
Anchor | ||||
---|---|---|---|---|
|
list structures | |
create a structure | |
read structure | |
update one or several structure fields | |
delete structure |
Quick navigation:
Anchor | ||||
---|---|---|---|---|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "id": 103, "name": "Structure with all fields", "description": "Voilà! This structure exhibits all fields.", "readOnly": "true", "editRequiresParentIssuePermission": true, "permissions": [ { "rule": "apply", "structureId": 102 }, { "rule": "set", "subject": "group", "groupId": "jira-developers", "level": "edit" }, { "rule": "set", "subject": "projectRole", "projectId": 10010, "roleId": 10020, "level": "admin" }, { "rule": "set", "subject": "anyone", "level": "view" }, { "rule": "set", "subject": "user", "username": "agentk", "level": "none" } ], "owner": "user:admin" } |
Anchor | ||||
---|---|---|---|---|
|
...
Please note that structure resources described on this page do not include information about issue hierarchies. The content of a structure, i.e. its hierarchy of items, can be read or modified using Forest Resource.
Anchor | ||||
---|---|---|---|---|
|
...
Apply rule creates a dependency on another structure. Circular dependencies are not allowed. Also, a REST API user can create such rule only if he has Control access level to the referenced structure.
Anchor | ||||
---|---|---|---|---|
|
...
| Integer code of the error |
| Brief technical description of the error. Contains a name of the corresponding StructureError enum constant. |
| The ID of the structure involved. |
| The ID of the JIRA issue involved. |
| More detailed message, may contain technical details. |
| User-displayable message in the REST API user locale or JIRA default locale if the user is not authenticated. |
Structure Resources
Anchor | ||||
---|---|---|---|---|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
GET $baseUrl/rest/structure/12.0/structure?permission=edit&withPermissions=true&withOwner=true |
...
Code Block | ||||
---|---|---|---|---|
| ||||
GET $baseUrl/rest/structure/12.0/structure.xml?name=test+plan |
...
|
|
| |
| If Structure Plugin is not accessible to the REST API user, or if issue with ID |
| |
| If |
| |
| If an internal error has occurred while processing this request. |
| |
| If Structure Plugin is stopped at the time of request. For example, the Restore operation may be in progress. |
Other return codes are possible under the normal rules of HTTP communication.
Anchor | ||||
---|---|---|---|---|
|
...
Request entity should contain the new structure. Structure name, name
, must be present and non-empty. Fields id
, readOnly
, and owner
are ignored. All rules in permissions
are validated according to their respective rule types.
Please note that this resource accepts only JSON structure representation.
...
| Structure data is not well-formed (syntax error) or invalid (semantic error.) |
| |
| If REST API user is not logged in or does not have permissions to access Structure Plugin or to create structures. Response contains error entity. |
| |
| If an internal error has occurred while processing this request. |
| |
| If Structure Plugin is stopped at the time of request. For example, the Restore operation may be in progress. |
Other return codes are possible under the normal rules of HTTP communication.
Anchor | ||||
---|---|---|---|---|
|
...
This resource allows to obtain structure details for the particular structure. By default, permissions
and owner
are not included, use query parameters to include them.
...
| One of the query parameters is too long. | |
| If REST API user does not have permissions to access Structure Plugin or does not have at least View permission on this structure. Response contains error entity. |
|
| If |
|
| If an internal error has occurred while processing this request. | |
| If Structure Plugin is stopped at the time of request. For example, the Restore operation may be in progress. |
Other return codes are possible under the normal rules of HTTP communication.
Anchor | ||||
---|---|---|---|---|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
POST $baseUrl/rest/structure/12.0/structure/$id/update |
Update one or several fields of a structure by POSTing to this resource.
...
Request entity should contain those structure fields that need to be changed. Non-present fields will not be changed (for this user; readOnly
may change for other users as a result of changing permissions
.) Fields id
, readOnly
, and owner
are ignored.
...
If permissions
field is present, all rules are validated according to their respective rule types.
Please note that this resource accepts only JSON structure representation.
...
Code Block | ||||
---|---|---|---|---|
| ||||
POST $baseUrl/rest/structure/12.0/structure/1/update |
Request entity | Response entity | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
POST $baseUrl/rest/structure/12.0/structure |
Request entity | Response entity | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
...
| Structure data is not well-formed (syntax error) or invalid (semantic error.) |
| |
| If REST API user is not logged in, does not have permissions to access Structure Plugin, or does not have Control access level to this structure. Response contains error entity. |
| |
| If an internal error has occurred while processing this request. | ||
| If Structure Plugin is stopped at the time of request. For example, the Restore operation may be in progress. |
|
Other return codes are possible under the normal rules of HTTP communication.
Anchor | ||||
---|---|---|---|---|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
DELETE $baseUrl/rest/structure/12.0/structure/108 |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "empty": true } |
...
| If REST API user is not logged in, does not have permissions to access Structure Plugin, or does not have Control access level to this structure. Response contains error entity. |
|
| If |
|
| If |
|
| If an internal error has occurred while processing this request. | |
| If Structure Plugin is stopped at the time of request. For example, the Restore operation may be in progress. |
Other return codes are possible under the normal rules of HTTP communication.