Skip to main content

getChildUserGroupsByMarker

Get the child groups of a user group.

Description​

Fetches the child groups of the group with the given marker and resolves to an array of IUserGroupEntity objects, or [] if the group has no children. Use it to walk the tree instead of matching parentId. If no group has that marker, it resolves to an IError with statusCode: 404 ("Group not found").

.getChildUserGroupsByMarker(

,

);

Parameters schema​

Schema

marker(required): string
Text identifier of the parent user group.
example: "guest"

langCode: string
Language code. Default: the langCode passed to defineOneEntry ("en_US" if none).
example: "en_US"

Examples​

Minimal example​

const response = await UserGroups.getChildUserGroupsByMarker('guest');

Example response​

[]

Response schema​

Schema: IUserGroupEntity[]

id: number
User group ID.
example: 1

depth: number
Level of the group in the tree: 0 for a top-level group, the parent's depth plus 1 for a child.
example: 0

parentId: number | null
Identifier of the parent group, null for a top-level group.
example: null

localizeInfos: ILocalizeInfo
Localized title of the group.

isVisible: boolean
Whether the group is visible.
example: true

childrenCount: string
Number of child groups. The API sends it as a string, not a number.
example: "0"

identifier: string
Text identifier (marker) of the group.
example: "guest"

isSync: boolean
Whether the group's attribute index is built for the requested language. When false, an empty attributeValues means the values aren't indexed yet, not that there are none.
example: false

attributeValues: IAttributeValues
Attribute values of the group.

version: number
Version number of the group. Returned only by getUserGroupById() and getUserGroupByMarker(); the list methods (getUserGroups(), getRootUserGroups(), getChildUserGroupsByMarker()) omit it.