Collaborations
Tracks collaboration settings on Box items such as files and folders, including user roles and permissions for shared access.
Table Specific Information
Collaborations are connections between Folders and Groups. For example, one Group can collaborate on a specific Folder.
Select
When selecting from the Collaborations table, you must specify Id, FolderId, or GroupId in the WHERE clause.
SELECT * FROM Collaborations WHERE Id = '62696811616';
If you're authenticated as an administrator with user impersonation permissions, you can query collaborations from multiple user accounts.
SELECT * FROM Collaborations 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 collaborations associated with their account.
- Collaborations shared with multiple users are only returned for one of the users.
Insert
To insert into Collaborations, connect a Folder with a Group or a User and assign a Role to them.
INSERT INTO Collaborations (Role, ItemId, ItemType, AccessibleById, AccessibleByType) VALUES ('admin', '1', 'folder', '2', 'user');
Update
You can only update the Role and Status columns.
UPDATE Collaborations SET Role = 'viewer', Status = 'accepted' WHERE Id = '100';
Delete
Delete a collaboration by specifying its Id:
DELETE FROM Collaborations WHERE Id = '100';
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | True |
Unique identifier assigned to the collaboration record in Box. |
| CreatedAt | Datetime | True |
The date and time when the collaboration was originally created. |
| ModifiedAt | Datetime | True |
The date and time when the collaboration was last updated. |
| AcknowledgedAt | Datetime | True |
The date and time when the invited collaborator acknowledged or accepted the collaboration. |
| CreatedById | String | True |
Identifier of the user who created the collaboration invitation. |
| Status | String | False |
The current state of the collaboration, such as pending, accepted, or rejected. |
| Role | String | False |
The permission level granted to the collaborator. Allowed values are editor, viewer, previewer, uploader, previewer uploader, viewer uploader, co-owner, or owner. |
| ItemId | String | False |
Identifier of the file or folder that the collaboration is associated with. |
| ItemType | String | False |
Specifies whether the collaboration is tied to a file or a folder. |
| AccessibleById | String | False |
Identifier of the user or group that has been granted access through the collaboration. |
| AccessibleByType | String | False |
The type of collaborator entity associated with AccessibleById, such as user or group. The allowed values are group, user. |
| AccessibleByLogin | String | False |
The login email of the user or group associated with AccessibleById. |
| AsUserId | String | False |
Identifier of the user to impersonate for API requests, available only to Admin, Co-Admin, and Service Accounts. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| FolderId | String |
Identifier of a folder used to filter collaborations related to that folder. |
| GroupId | String |
Identifier of a group used to filter collaborations related to that group. |