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

FlagDescription
--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

Example Request

files-cli group-users list \
  --group-id=1

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

FlagDescription
--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?

Example Request

files-cli group-users create \
  --group-id=1 \
  --user-id=1

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

FlagDescription
--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?

Example Request

files-cli group-users update \
  --id=1 \
  --group-id=1 \
  --user-id=1

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

FlagDescription
--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.

Example Request

files-cli group-users delete \
  --id=1 \
  --group-id=1 \
  --user-id=1

The GroupUser Object

Some of the commands above return a GroupUser object. The attributes of this object are listed below.

AttributeDescription
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