Retrieves a list of all the tasks for a file. This endpoint does not support pagination.
This operation is performed by calling function getFileTasks.
See the endpoint docs at API Reference.
await client.tasks.getFileTasks(file.id);
string
https://*.app.box.com/files/123 the file_id is 123. Example: “12345”GetFileTasksOptionalsInputThis function returns a value of type Tasks.
Returns a list of tasks on a file.
If there are no tasks on this file an empty collection is returned instead.
Creates a single task on a file. This task is not assigned to any user and will need to be assigned separately.
This operation is performed by calling function createTask.
See the endpoint docs at API Reference.
await client.tasks.createTask({
item: {
type: 'file' as CreateTaskRequestBodyItemTypeField,
id: file.id,
} satisfies CreateTaskRequestBodyItemField,
message: 'test message',
dueAt: dateTime,
action: 'review' as CreateTaskRequestBodyActionField,
completionRule: 'all_assignees' as CreateTaskRequestBodyCompletionRuleField,
} satisfies CreateTaskRequestBody);
CreateTaskRequestBody
CreateTaskOptionalsInputThis function returns a value of type Task.
Returns the newly created task.
Retrieves information about a specific task.
This operation is performed by calling function getTaskById.
See the endpoint docs at API Reference.
await client.tasks.getTaskById(task.id!);
string
GetTaskByIdOptionalsInputThis function returns a value of type Task.
Returns a task object.
Updates a task. This can be used to update a task’s configuration, or to update its completion state.
This operation is performed by calling function updateTaskById.
See the endpoint docs at API Reference.
await client.tasks.updateTaskById(task.id!, {
requestBody: {
message: 'updated message',
} satisfies UpdateTaskByIdRequestBody,
} satisfies UpdateTaskByIdOptionalsInput);
string
UpdateTaskByIdOptionalsInputThis function returns a value of type Task.
Returns the updated task object.
Removes a task from a file.
This operation is performed by calling function deleteTaskById.
See the endpoint docs at API Reference.
await client.tasks.deleteTaskById(task.id!);
string
DeleteTaskByIdOptionalsInputThis function returns a value of type undefined.
Returns an empty response when the task was successfully deleted.