Get a task with its approvals and log
const url = 'http://127.0.0.1:7700/api/tasks/t3k9x2a1b2';const options = {method: 'GET', 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 GET \ --url http://127.0.0.1:7700/api/tasks/t3k9x2a1b2 \ --header 'Authorization: Bearer <token>'The task, every approval it asked for, and every action log event that belongs to it, in order.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The task id.
Example
t3k9x2a1b2Responses
Section titled “Responses”The task, its approvals and its events.
object
object
A short name for people.
What the worker should do. For the fake worker, one command per line.
A folder in BOX_HOME/workspaces. The task works on its own copy of it.
droid is Droid with Claude. fake runs scripted steps with no model, for tests.
Tool names the task may call through its broker, such as wallet.pay.
Hosts the task’s network may reach: example.com (any port), example.com:8080 (one port) or *.example.com (subdomains).
Spending above this, in US cents, pauses the task for an OK. Default Settings defaultBudgetCents, 0 unless changed.
Who started it, for the log and the portal: api, schedule, asi1, jira:BOX-12.
Personal: the first real folder the task works on a copy of.
Personal: every real folder the task works on.
queued created, not started. running the worker is working. waiting paused until an
approval is answered. done finished; its changes are part of the workspace. failed stopped with
an error; its changes are not applied. undone removed; its changes are gone and other tasks keep
theirs.
The Linux user the task runs as, box-<id>.
Finished tasks whose changes this task saw when it started, newest first.
Tool spending plus model cost, in US cents. Not rounded.
The latest step
Why it failed. A worker that exited with an error ends with its own last error line: worker exited with 1: Error: ....
Personal, for a task on real folders: done and waiting for the owner, kept, stopped by a conflict, or undone.
object
<task id>.<key>. The same key asked twice is the same approval.
The question shown to people.
The spending being asked about
Who gets paid
What the spend or action is for.
Who answered: a paired device’s name, what the box’s own screen sent (such as box screen), jira:<name>, asi1, undo, or task ended.
One line of the action log. See Log events.
object
The line number in log.jsonl
The task the event belongs to
The spec with every default filled in.
object
A short name for people.
What the worker should do. For the fake worker, one command per line.
A folder in BOX_HOME/workspaces. The task works on its own copy of it.
droid is Droid with Claude. fake runs scripted steps with no model, for tests.
Tool names the task may call through its broker, such as wallet.pay.
Hosts the task’s network may reach: example.com (any port), example.com:8080 (one port) or *.example.com (subdomains).
Spending above this, in US cents, pauses the task for an OK. Default Settings defaultBudgetCents, 0 unless changed.
Who started it, for the log and the portal: api, schedule, asi1, jira:BOX-12.
Personal: the first real folder the task works on a copy of.
Personal: every real folder the task works on.
One line of the action log. See Log events.
object
The line number in log.jsonl
The task the event belongs to
queued created, not started. running the worker is working. waiting paused until an
approval is answered. done finished; its changes are part of the workspace. failed stopped with
an error; its changes are not applied. undone removed; its changes are gone and other tasks keep
theirs.
One line of the action log. See Log events.
object
The line number in log.jsonl
The task the event belongs to
What the worker needs to resume.
One line of the action log. See Log events.
object
The line number in log.jsonl
The task the event belongs to
One line of the action log. See Log events.
object
The line number in log.jsonl
The task the event belongs to
What the call spent. Counts toward the task’s cost.
One line of the action log. See Log events.
object
The line number in log.jsonl
The task the event belongs to
object
<task id>.<key>. The same key asked twice is the same approval.
The question shown to people.
The spending being asked about
Who gets paid
What the spend or action is for.
Who answered: a paired device’s name, what the box’s own screen sent (such as box screen), jira:<name>, asi1, undo, or task ended.
One line of the action log. See Log events.
object
The line number in log.jsonl
The task the event belongs to
One line of the action log. See Log events.
object
The line number in log.jsonl
The task the event belongs to
object
One line of the action log. See Log events.
object
The line number in log.jsonl
The task the event belongs to
host:port the task tried to reach.
One line of the action log. See Log events.
object
The line number in log.jsonl
The task the event belongs to
object
Path inside the workspace.
One line of the action log. See Log events.
object
The line number in log.jsonl
The task the event belongs to
The app that wrote the note.
Example
{ "task": { "workspace": "home", "worker": "droid", "tools": [], "hosts": [], "source": "api", "id": "t3k9x2a1b2", "state": "queued", "user": "box-t3k9x2a1b2", "review": "pending" }, "approvals": [ { "state": "pending" } ], "events": [ { "type": "task.created", "spec": { "workspace": "home", "worker": "droid", "tools": [], "hosts": [], "source": "api" } } ]}No task with this id.
object
What went wrong
Example
{ "error": "no task t3k9x2a1b2"}GurtOS is open source under the Apache License 2.0.Source code on GitHub.