Changes a layer group of a project, or the content and order of a group. Only the fields you send are changed.
Required role: ORG_EDITOR, and the current user must have the MODIFY permission on the project.
layer-group is a group id, or root for the root of the project's tree (to reorder its content with children).
Fields
| Field | Effect |
|---|---|
name | Merged with the current name: the locales you send replace the current text, the others are kept. Send null or "" for a locale to remove it. Must keep a text in the project's default language. |
visible | Replaces the current value. |
iconData | Replaces the icon (SVG, PNG, GIF or JPEG as Base64, 100 x 100 pixels at most). "" removes it. |
parentId | Moves the group, with its content, into another group of this project. "" or "root" moves it to the root. It can't be the group itself or one of its own groups. Its position among its new siblings isn't defined: set it with children on the new parent. The root can't be moved. |
children | Replaces the content of the group, in this order (top first): layer ids and group ids of this project. The listed nodes are moved into the group. The nodes it contained and that aren't listed are moved to the root (for root, they stay, after the listed ones). [] empties the group. It can't contain the group itself or a group that contains it. |
name, visible, iconData and parentId are ignored for root. Tags are changed with POST and DELETE .../layers-groups/{layer-group}/tags.
Response
result is layer-group as sent (root stays root).
Layer tree
The layers of a project are shown in a tree. Its root is a hidden group, root, created with the project. It holds layers and layer groups; a group can hold layers and other groups. A new layer is added at the bottom of the root. A layer is in one place only.
In children (request and response), a layer is identified by its layer id and a group by its group id. The groups and layers you send must be in this project's tree; otherwise the request returns 404 (the group in the path, parentId) or 400 (children).
Organization
organization must be the organization of the access token, and the project must belong to it; otherwise the request returns 404.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||