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 |
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. |
The actions
array may contain the following JSON objects:
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.
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.
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.
{ "update": { ... }, "errors": [ "error text" ] } |
Response Fields:
update |
the object containing update to the client's structure specified by parameters |
errors |
array of the error strings, absent if no errors |