TaskAssignments
Create, update, delete, and query the available Task Assignments in Box.
Table Specific Information
Task Assignments are Tasks assigned to a specific User.
Select
To select from the TaskAssignments table you need to specify an Id or a TaskId.
SELECT * FROM TaskAssignments WHERE Id = '123'
If you're authenticated as an administrator with user impersonation permissions, you can query task assignments from multiple user accounts:
SELECT * FROM TaskAssignments 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 task assignments associated with their account.
- Task assignments shared with multiple users are only returned for one of the users.
Insert
To insert into Task Assignments you need to connect a Task (TaskId) with a User (AssignedToId).
INSERT INTO TaskAssignments (TaskId, AssignedToId) VALUES (1001, 123)
Update
Only the Message of the Task Assignment or its ResolutionState can be updated.
UPDATE TaskAssignments SET Message = 'x', ResolutionState = 'completed' WHERE Id = '111'
Delete
Task Assignments can be deleted by providing an Id and issuing a DELETE statement.
DELETE FROM TaskAssignments WHERE Id = '111'
Columns
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The Id of the task assignment. |
TaskId | String | False |
The Id of the task to assign. |
AssignedToId | String | False |
The Id of the user to assign the task to. |
AssignedToName | String | False |
The Name of the user the task is assigned to. |
AssignedToLogin | String | False |
The Login of the user the task is assigned to. |
ItemType | String | False |
The the type of the item the task assignment is connected to. |
ItemId | String | False |
The the id of the item the task assignment is connected to. |
ItemName | String | False |
The the name of the item the task assignment is connected to. |
Message | String | False |
The message attached to the task assignment. |
AssignedById | String | False |
The Id of the user that assigned the task. |
AssignedByName | String | False |
The Name of the user that assigned the task. |
AssignedByLogin | String | False |
The Login of the user that assigned the task. |
AssignedAt | Datetime | True |
The date the task was assigned at. |
RemindedAt | Datetime | True |
The date of the task reminder. |
CompletedAt | Datetime | True |
The date the task was completed at. |
ResolutionState | String | False |
Determines if the task has been attended to or not. The allowed values are completed, incomplete, approved, rejected. |
AsUserId | String | False |
The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |