Skip to main content

getUserGroupByMarker

Getting a single user group object by its marker.

Description​

This method retrieves a single user group object by its text identifier (marker). It returns a Promise that resolves to an IUserGroupEntity object.

UserGroups.getUserGroupByMarker(marker, langCode);

Parameters​

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

langCode: string (optional)
Language code. Default: "en_US".
example: "en_US"

Examples​

Minimal example​

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

Example response​

{
"id": 1,
"depth": 0,
"parentId": null,
"localizeInfos": {
"title": "Guest"
},
"isVisible": true,
"childrenCount": "0",
"identifier": "guest",
"isSync": false,
"attributeValues": {},
"version": 0
}

Response schema​

Schema: IUserGroupEntity

id: number
Identifier of the user group.
example: 1

depth: number
Nesting depth relative to the parent.
example: 0

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

localizeInfos: ILocalizeInfo
Title of the group, taking localization into account.

isVisible: boolean
Visibility flag.
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
Synchronization flag.
example: false

attributeValues: IAttributeValues
Attribute values of the group.

version: number
Version of the object. Not present on every stand.
example: NaN