Tasks
Create, update, delete, and query the available Tasks in Box.
テーブル固有の情報
Task は誰かにアサインされることを待っているジョブです。これらのタスクは、一般的にはFile であるアイテムにリレーションがあります。
Select
Task テーブルのSelect には、Id もしくはItemId を指定してください。
SELECT * FROM Tasks WHERE Id = '123'
Insert
Task テーブルへの挿入にはItemId が必要です。現時点ではBox API でタスク管理できるタイプはFile だけです。
INSERT INTO Tasks(ItemId, ItemType, Action, Message) VALUES (1001, 'file', 'review', 'message')
Update
特定のTask を更新するには、Message が必要です。また、Action およびDueAt カラムも更新可能です。Action カラムは'review' の値しか取れません。
UPDATE Tasks SET Message='updated message', Action = 'review', DueAt='2016-05-14' WHERE ID = '100'
Delete
Id を指定して、Task を削除することができます。
DELETE FROM Tasks WHERE Id = '100'
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | True |
The Id of the task. |
| DueAt | Datetime | False |
The date due of this task. |
| ItemId | String | False |
The Id of the item the task is targeted to. |
| ItemType | String | False |
The type of the item the task is targeted to. |
| Action | String | False |
The action the task assignee will be prompted to do. |
| Message | String | False |
An optional message to include with the task. |
| CreatedAt | Datetime | True |
The date that the task was created at. |
| CreatedById | String | True |
The id of user that created the task. |
| CreatedByName | String | True |
The name of the user that created the task. |
| CreatedByLogin | String | True |
The login of the user that created the task. |
| IsCompleted | Boolean | False |
If the task has been completed or not. |
Pseudo-Columns
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| Name | Type | Description |
| AsUserId | String |
The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |