Skip to navigation

Nest a draft container tree under another container

View as Markdown

Nests an existing DRAFT tree under an existing container, so you can build a sub-structure separately, review it, then slot it into place.

The sibling of PUT /{structureId}/owner: that gives a draft an owner directly, this gives it a parent and it inherits whatever the parent has. If the target container belongs to a program or specialisation, the whole moved subtree becomes part of that curriculum; if the target is itself a draft, the subtree stays a draft.

Only a draft ROOT can be moved. A container already in a live curriculum is not re-parented here. A target inside the tree being moved is rejected, since that would make a cycle.

Pass sort to set its position among the target’s children.

Authentication

AuthorizationBearer

Paste a Keycloak access token (no "Bearer " prefix)

Path parameters

structureIdstringRequiredformat: "uuid"

Query parameters

parentIdstringOptionalformat: "uuid"
sortintegerOptional

Response

The draft and everything beneath it now sit under the target container.
structureIdstringOptionalformat: "uuid"
parentIdstringOptionalformat: "uuid"
The container it now sits under.
containersMovedintegerOptional

How many containers moved: the draft root plus everything beneath it.

Errors

400
Bad Request Error
404
Not Found Error