Keep a task's changes in the real folder
const url = 'http://127.0.0.1:7700/api/tasks/t3k9x2a1b2/keep';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:7700/api/tasks/t3k9x2a1b2/keep \ --header 'Authorization: Bearer <token>'Preview, owner only. For a done task that worked on the owner’s real folders: applies its changes,
one file at a time, each replaced atomically. A kept file keeps the real file’s owner, group and
mode; a new file takes the owner of the folder it lands in. Before each file is written, its old
version is saved under BOX_HOME/timemachine/<id>/, so the Keep can be undone with
POST /tasks/{id}/unkeep.
If the owner changed, created or deleted any of the same files since the task started, nothing is
applied in any folder and the response lists the clashing paths. The task’s review becomes kept
or conflict, and a keep event goes into the log.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The task id.
Example
t3k9x2a1b2Responses
Section titled “Responses”The changes applied, or the conflicts that stopped them.
No such task, the task is not done or was already kept, or its workspace is not a real folder.
object
What went wrong
Example
{ "error": "task t3k9x2a1b2 is running; only a done task can be kept"}The owner’s route, called by someone who is not the box’s own screen or a device paired as the owner.
object
What went wrong
Example
{ "error": "only the box's own screen or the owner's paired device can do this"}GurtOS is open source under the Apache License 2.0.Source code on GitHub.