Skip to content

Move node

Start from the script setup block, then add the snippet code below.

Move a node. Set force to true when moving across sites. Requires write:hierarchy.

# ... script setup ...
NODE_ID = "your-node-id"
NEW_PARENT_ID = "your-new-parent-id"
moved = api_patch(
f"/v1/nodes/{NODE_ID}/move/{NEW_PARENT_ID}",
{"force": True},
)
print(json.dumps(moved, indent=2))