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
Command
files-cli group-users list
Output
Outputs a list of GroupUser objects according to the output format.
Authorization Requirement
Available to all authenticated keys or sessions.
Flags
| Flag | Description |
|---|---|
| --group-id= int64 | Group ID. If provided, will return group_users of this group. |
| --user-id= int64 | User ID. If provided, will return group_users of this user. |
Additional Arguments
Create Group User
Command
files-cli group-users create
Output
Outputs a GroupUser object according to the output format.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Flags
| Flag | Description |
|---|---|
| --group-id= int64 Required | Group ID to add user to. |
| --user-id= int64 Required | User ID to add to group. |
| --admin boolean | Is the user a group administrator? |
Update Group User
Command
files-cli group-users update
Output
Outputs a GroupUser object according to the output format.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Flags
| Flag | Description |
|---|---|
| --id= int64 Required | Group User ID. |
| --group-id= int64 Required | Group ID to add user to. |
| --user-id= int64 Required | User ID to add to group. |
| --admin boolean | Is the user a group administrator? |
Delete Group User
Command
files-cli group-users delete
Output
No output is returned.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Flags
| Flag | Description |
|---|---|
| --id= int64 Required | Group User ID. |
| --group-id= int64 Required | Group ID from which to remove user. |
| --user-id= int64 Required | User ID to remove from group. |
The GroupUser Object
Some of the commands above return a GroupUser object. The attributes of this object are listed below.
| Attribute | Description |
|---|---|
| group_name string | Group name |
| group_id int64 | Group ID |
| user_id int64 | User ID |
| admin boolean | Is this user an administrator of this group? |
| username string | Username of the user |