getUserGroupById
Getting a single user group object by its identifier.
Description
This method retrieves a single user group object by its identifier. It returns a Promise that resolves to an IUserGroupEntity object.
UserGroups.getUserGroupById(id, langCode);
Parameters
id: number
Identifier of the user group.
example: 1
langCode: string (optional)
Language code. Default: "en_US".
example: "en_US"
Examples
Minimal example
const response = await UserGroups.getUserGroupById(1);
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