Child pages
  • Forest Resource - POST

This documentation relates to an older version 2.5 of the Structure Plugin for JIRA. View the current documentation home.

Skip to end of metadata
Go to start of metadata

Request

POST $baseUrl/rest/structure/1.0/structure/$id/forest

{
   "base":0,
   "root":0,
   "actions":[
      {
         "action":"move",
         "issue":13212,
         "under":10037,
         "after":13210
      },
      {
         "action":"delete",
         "issue":13213
      },
      {
         "action":"add",
         "issue":10410,
         "under":10092,
         "after":0
      }
   ]
}

Updates the hierarchical issue list (forest) by applying the specified actions.

Parameters:

$id

required

The ID of the structure.

base

required

The base version for the update reply from the server
Set to 0. Detailed explanation of this parameter will be published later.

root

required

The ID of the pinned issue for the Pinned Issue Mode, used only to create the reply.

actions

required

Array of actions to be applied to the forest, must contain at least one action. The actions are applied in the specified order.

Possible actions

The actions array may contain the following JSON objects:

Move action

action

"move"

issue

the ID of the issue to move

under

the new parent for the moved issue, or 0 to put it at the top level

after

the sibling issue (issue under the same parent) that must come before the moved issue, or 0 to place the issue as the first child issue

If the moved issue contains sub-issues, the whole sub-tree will be moved.

This action object corresponds to the moveSubtree method of the ForestAccessor interface.

Add action

action

"add"

issue

the ID of the issue to add

under

the new parent for the moved issue, or 0 to put it at the top level

after

the sibling issue (issue under the same parent) that must come before the moved issue, or 0 to place the issue as the first child issue

The new issue will be added to the structure at the position specified by (under, after) coordinates.

This action object corresponds to the addIssue method of the ForestAccessor interface.

Delete action

action

"delete"

issue

the ID of the issue to delete

The issue will be removed from the forest. (The issue itself will not be changed.)

If the removed issue contains sub-issues, the whole sub-tree will be removed.

This action object corresponds to the removeSubtree method of the ForestAccessor interface.

Response

{  
   "update": { 
      ...
   },
   "errors": [
      "error text"
   ]
}

Response Fields:

update

the object containing update to the client's structure specified by parameters root and base, absent if base is 0

errors

array of the error strings, absent if no errors

  • No labels