Group Users
A GroupUser is a record about membership of a User within a Group.
Creating GroupUsers
GroupUsers can be created via the normal create action. When using the update action, if the
GroupUser record does not exist for the given user/group IDs it will be created.
List Group Users
SDK Method
groupuser.List()
Return Object
[]*GroupUser
Authorization Requirement
Available to all authenticated keys or sessions.
GroupUserListParams Fields
| Field | Description |
|---|---|
| GroupId int64 | Group ID. If provided, will return group_users of this group. |
| UserId int64 | User ID. If provided, will return group_users of this user. |
Additional Arguments
Create Group User
SDK Method
groupuser.Create()
Return Object
GroupUser
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
GroupUserCreateParams Fields
| Field | Description |
|---|---|
| GroupId int64 Required | Group ID to add user to. |
| UserId int64 Required | User ID to add to group. |
| Admin boolean | Is the user a group administrator? |
Update Group User
SDK Method
groupuser.Update()
Return Object
GroupUser
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
GroupUserUpdateParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Group User ID. |
| GroupId int64 Required | Group ID to add user to. |
| UserId int64 Required | User ID to add to group. |
| Admin boolean | Is the user a group administrator? |
Delete Group User
SDK Method
groupuser.Delete()
Return Object
No return value.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
GroupUserDeleteParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Group User ID. |
| GroupId int64 Required | Group ID from which to remove user. |
| UserId int64 Required | User ID to remove from group. |
The GroupUser Object
Some of the methods above return a GroupUser object. The attributes of this object are listed below.
| Attribute | Description |
|---|---|
| GroupName string | Group name |
| GroupId int64 | Group ID |
| UserId int64 | User ID |
| Admin boolean | Is this user an administrator of this group? |
| Username string | Username of the user |