Update a layer group

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

FieldEffect
nameMerged 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.
visibleReplaces the current value.
iconDataReplaces the icon (SVG, PNG, GIF or JPEG as Base64, 100 x 100 pixels at most). "" removes it.
parentIdMoves 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.
childrenReplaces 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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

Id of your organization (must match the access token)

uuid
required

Id of the project

string
required

Id of the layer group, or root for the root of the layer tree

Body Params

Fields to change. Fields not sent are left unchanged.

children
array of strings

Replaces the content of the group, in this order (top first): layer ids and group ids. The nodes it contained and that aren't listed are moved to the root. [] empties the group

children
string

Replaces the icon: SVG, PNG, GIF or JPEG image as Base64, 100 x 100 pixels at most. "" removes it. Ignored for root

name
object

Merged with the current name: the locales sent replace the current text, null or "" removes a locale. Must keep a text in the project's default language. 2048 characters at most per text. Ignored for root

string

Id of the group to move it into, with its content. "" or root moves it to the root. The root can't be moved

boolean

Whether the group is visible. Ignored for root

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json