Groups
Create, update, delete, and query the available Groups in Box.
Table Specific Information
Select
You can retrieve all the Groups or filter them by Id.
SELECT * FROM Groups
If you're authenticated as an administrator with user impersonation permissions, you can query groups from multiple user accounts:
SELECT * FROM Groups WHERE AsUserId IN (SELECT Id FROM Users)
Note: User impersonation has the following limitations:
- The authenticated user cannot be impersonated unless that user is a service account.
- If the authenticated user is a standard user account, they can only query groups associated with their account.
- Groups shared with multiple users are only returned for one of the users.
Insert
Only the Name column is required to create a Group.
INSERT INTO Groups (Name, Provenance, MemberViewabilityLevel) VALUES ('new group', 'google', 'admins_only')
Update
Any column where ReadOnly=False can be updated.
UPDATE Groups SET InvitabilityLevel = 'admins_and_members' WHERE Id = '111'
Delete
Groups can be deleted by providing an Id and issuing a DELETE statement.
DELETE FROM Groups WHERE Id = '111'
Columns
Name | Type | ReadOnly | Description |
ID [KEY] | String | True |
The Id of the group. |
Name | String | False |
The name of the group. |
Provenance | String | False |
Typically used to track the external source where the group is coming from. |
ExternalSyncIdentifier | String | False |
Typically used as a group identifier for groups coming from an external source. |
Description | String | False |
The description of the group. |
InvitabilityLevel | String | False |
Specifies who can invite this group to folders. |
MemberViewabilityLevel | String | False |
Specifies who can view the members of this group. |
CreatedAt | Datetime | True |
The date the group was created at, you need to specify an Id to recieve this column. |
ModifiedAt | Datetime | True |
The date the group was modified at, you need to specify an Id to recieve this column. |
AsUserId | String | False |
The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |