The sandbox's timeline, newest first
What happened in the sandbox, for its org only: lifecycle calls and
the statuses the sandbox reached, commands run through exec (command
line, exit code and duration), desktop actions, who took control of
the desktop, and, when capture_content is enabled, the first and
last 4 KiB of command output, typed text, and screenshots with
thumbnails. Each event says who caused it. Content capture is off by
default.
Environment values, vault values and stdin are never recorded, nor
is the output of a command that received stdin: its stdout reads
[output not recorded: command received stdin].
Before an event is stored, its command line, output, typed text and
errors are masked, best effort: the values of the sandbox’s vault
entries (at least 4 bytes, as injected when the sandbox was created
and as they are now) and environment variables (at least 8 bytes,
the sandbox’s and the command’s own) become [redacted NAME], and
common token formats become [redacted]: Authorization, Bearer and
Basic header values; sk-, ghp_, gho_, github_pat_, xoxb-
and xoxp- tokens; AWS access key IDs; PEM private keys; and the
values of token, secret, password and api_key pairs. Other
secrets in opted-in content may be recorded. The injected values are
held in memory only, so after a restart of the server a vault value
replaced since the sandbox was created is no longer masked.
Events are kept for retention.events_days, thumbnails for
retention.screenshots_days, and each org’s timeline has a size cap
beyond which its oldest events are deleted. Deleting a sandbox
deletes its timeline, so a deleted sandbox has none. Page with
before set to next_before.
/v1/sandboxes/{sandbox}/eventsAuthorizationBearer token · headerrequiredOrg-scoped API key, pols_....
sandboxstringrequiredSandbox ID (sbx_...), name, host label, or a host the edge serves
it on (braveotterk3f9-desktop or
braveotterk3f9-desktop.on.pols.so). A name wins over a host label
or host spelled the same. A sandbox of another of the key's user's
orgs fails with sandbox_in_other_org, except for a sandbox-scoped
key, which gets not_found.
beforeinteger<int64>Return events older than this event ID (next_before of the previous page).
limitintegerAt most this many events.
typeSandboxEventType[]Only events of these types; repeat for several.
A page of the timeline.
eventsSandboxEvent[]requiredShow propertiesHide properties
SandboxEventidinteger<int64>requiredGrows with every event.
sandbox_idstringrequiredatstring<date-time>requiredtypeSandboxEventTyperequiredlifecycle: a lifecycle call or a status the sandbox reached.
exec: a command. computer: a desktop action. screenshot: a
screenshot of the desktop, present only when content capture is on.
control: a person viewing the desktop took control of it, handed
it back, or their control lapsed.
lifecycleexeccomputerscreenshotcontrolactorEventActorrequiredWho caused the event.
Show propertiesHide properties
kindstringrequiredapi_key: a call with an API key (CLI, MCP, a client);
account: a member of the org on the account pages (id is
the user's ID, name their email); operator: a pols.so
operator on the admin pages; system: pols.so itself (the
reconciler, the expiry, the credit and trial limits, the abuse
protection).
api_keyaccountoperatorsystemidstringThe API key's ID, or the account page user's.
namestringrequiredThe key's name when the event happened, the account page
user's email (account user for a sandbox-scoped API key, which
sees no account emails), or the system's reason.
summarystringrequiredOne line describing the event.
lifecycleLifecycleEventDetailShow propertiesHide properties
actionstringrequiredcreate, fork (this sandbox was made as a fork of sandbox),
forked (a fork, sandbox, was made from this one), stop,
resume, delete, rename (to name), resize (to size),
user_add and user_remove (of user), checkpoint and
rollback (to checkpoint) are calls; status means the sandbox
reached status, resized that its VM got size, or with
error that it could not and kept its size, and rolled_back
that its disk is checkpoint's, or with error that it could not
be rolled back and kept its disk.
createforkforkedstopresumedeleterenameresizeresizeduser_adduser_removecheckpointrollbackrolled_backstatusstatusSandboxStatusWhere the sandbox actually is. pending means not created in the
runtime yet, or still booting. running means booted: its guest
agent answers, so exec and file calls work. A booting sandbox keeps
its previous status, but its running interval (and billing) starts
when the VM starts. standby means its VM is paused because it was
idle, its memory written to disk on Cloud Hypervisor or kept on the
host on Incus; the next call that needs it wakes it (see Standby
above). error means the reconciler gave up; delete it.
host_down means the server it runs on has been unreachable for
5 minutes: it is not billed for its memory, calls that need it
answer host_unavailable, and once the server is back it returns
to where its VM is (running, standby, or stopped if the VM stopped
meanwhile, which then boots again if it is meant to run).
pendingrunningstoppeddeletederrorstandbyhost_downerrorstringWhy the sandbox stopped unexpectedly or failed, as last_error says.
sandboxstringThe other sandbox of a fork.
namestringThe sandbox's new name, on a rename.
sizeSizeSandbox size. small: 2 vCPU, 4 GiB RAM, 20 GiB disk. default: 4 vCPU,
8 GiB, 50 GiB. large: 8 vCPU, 16 GiB, 100 GiB. xlarge: 16 vCPU,
32 GiB, 200 GiB. A create that names no size gets small, or the
smallest size whose disk holds the template. PATCH /v1/sandboxes/{sandbox} resizes a sandbox; its disk only grows.
micro: 1 vCPU, 1 GiB, 10 GiB, is for databases only (POST /v1/databases): a sandbox of purpose database may have it, no
other sandbox.
smalldefaultlargexlargemicrouserstringThe Linux user added or removed.
checkpointstringThe name of the checkpoint taken or rolled back to.
execExecEventDetailShow propertiesHide properties
commandstring[]requiredProgram and arguments, redacted and cut to 4 KiB in all.
cwdstringrootbooleanuserstringThe sandbox user the command ran as, unless it ran as root or the default user.
exit_codeintegerAbsent when the command did not finish (see error).
duration_msinteger<int64>requiredtimed_outbooleanerrorstringWhy there is no exit code.
stdoutstringWith content capture on, the first and last 4 KiB of standard output, redacted, without terminal escape sequences; a marker stands for the middle of a longer stream.
stderrstringThe same for standard error.
stdout_bytesinteger<int64>requiredThe full length of standard output.
stderr_bytesinteger<int64>requiredtruncatedbooleanThe middle of a stream was left out.
streamedbooleanThe output was streamed (NDJSON).
processstringThe detached process (see listSandboxProcesses): its start
has no exit_code, and its exit, recorded by the system, has
one, unless error says why not.
computerComputerEventDetailShow propertiesHide properties
actionComputerActionTyperequiredclick: click button at (x, y). double_click: double-click button at (x, y).
drag: press the left button at (x, y), move to (to_x,
to_y) and release. type: type text as keystrokes. key: press
keys. scroll: scroll amount wheel clicks in direction with
the pointer at (x, y).
clickdouble_clickdragtypekeyscrollxintegeryintegerto_xintegerto_yintegerbuttonstringtextstringWith content capture on, typed text, redacted and cut to 1 KiB.
keysstringdirectionstringamountintegererrorstringWhy the action failed.
userstringThe user added under .../users whose desktop it was; absent for the default desktop.
screenshotScreenshotEventDetailShow propertiesHide properties
userstringThe user added under .../users whose desktop it was; absent for the default desktop.
widthintegerrequiredheightintegerrequiredbytesinteger<int64>requiredThe size of the PNG the call returned.
thumbnailbooleanrequiredA thumbnail is stored (GET .../events/{event}/thumbnail).
controlControlEventDetailShow propertiesHide properties
actionstringrequiredtaken: holder took control of the desktop; released: they
handed it back; expired: their control lapsed, for reason.
takenreleasedexpiredholderstringrequiredTheir name as the desktop's viewers saw it.
reasonstringOnly with expired. idle: they did not use the desktop for 2
minutes; disconnected: they closed it, or the sandbox stopped.
idledisconnecteduserstringThe user added under .../users whose desktop it was; absent for the default desktop.
next_beforeinteger<int64>Pass as before for the next, older page; absent on the last page.
retentionTimelineRetentionrequiredHow long the timeline keeps what it records.
Show propertiesHide properties
events_daysintegerrequiredEvents are deleted after this many days.
screenshots_daysintegerrequiredThumbnails are deleted after this many days.
Rate limited (rate_limited): too many requests or failed
authentications from this address, too many requests or
lifecycle calls for this org, or too many of its exec, file,
computer and CDP calls in progress at once. Retry after
Retry-After seconds.
errorobjectrequiredShow propertiesHide properties
codestringrequiredStable machine-readable code: bad_request (400),
unauthorized (401), insufficient_credit (402, no
credit left to start a sandbox), subscription_required
(402, the org needs a subscription to start or wake a
sandbox, see subscription on /v1/balance), forbidden (403),
quota_exceeded (403), trial_limit (403, beyond what a
trial org may run), key_limit (403, beyond the limits the
org set on the calling API key, see key_limit),
not_found (404), conflict (409),
billing_details_required (409, save the billing details
before topping up), topup_not_available (409, the org
cannot top up as it would be taxed; the message says why),
authorization_pending, slow_down and expired_token
(400), and access_denied and approval_pending (403), of
POST /v1/agent-logins/token,
withdrawal_consent_required (409, a consumer orders a
top-up or the subscription only with withdrawal_consent),
desktop_controlled (409, a person viewing the desktop has
taken control of it, see control), idempotency_key_reused
(422, the Idempotency-Key was used for a different
request), rate_limited (429,
see Retry-After), trial_capacity
(429, all trial capacity in use; retry after
Retry-After), host_capacity (429, the host is short of
memory right now, or no host has room for that size, so
nothing new starts there; retry after Retry-After), host_disk
(429, no host's Cloud Hypervisor disk space has room for the
sandbox's disk; retry after Retry-After), internal (500),
runtime_error (502, the sandbox host failed),
payment_provider_error (502, Mollie could not be
reached or refused a payment), github_error (502, GitHub
could not be reached or answered with an error),
sandbox_in_other_org (404, the sandbox is not in the org
the API key acts in but in another org of its user, see
org_id), unavailable (503, the feature is not
configured on this deployment), waking (503, the sandbox is still waking
from standby or booting; retry), server_busy (503, the
sandbox's host has no room to wake it from standby yet;
polsd keeps retrying, retry after Retry-After), host_unavailable
(503, the sandbox is host_down: the server it runs on is
unreachable; retry after Retry-After), unresponsive (503, the
sandbox did not start an exec's command in time, usually
because its memory is full), timeout (504, or 408 when a request
body stalls).
messagestringrequiredcontrolDesktopControlWho has control of a sandbox's desktop. In an error, it is present
only with code desktop_controlled.
Show propertiesHide properties
heldbooleanrequiredSomeone viewing the desktop has taken control of it.
holderstringOnly when held; their name as the desktop's viewers see it, their user's name or else their API key's.
sincestring<date-time>Only when held; when they took control.
expires_atstring<date-time>Only when held; when control lapses unless they use the desktop before.
org_idstringFor sandbox_in_other_org: the org that has the sandbox,
one the key's user belongs to. An API key acts in one org;
use a key of that org to reach the sandbox.
key_limitKeyLimitErrorFor key_limit: which of the calling key's limits the call is
beyond (see Key limits above). Only an org owner or admin can
change them, on https://my.pols.so/account/agents.
Show propertiesHide properties
limitstringrequiredaction: the key may not take action at all; allowed lists
the actions it may take. max_size: current is the size asked
for, max the largest size the key may resize or fork to.
monthly_spend: current is what the key's sandboxes, deleted
ones included, have cost in CPU and RAM this calendar month
(UTC), max its cap, both in EUR like 12.3400; it resets when
the next month starts. max_sandboxes: current is how many
sandboxes the key has that are not deleted, max how many it
may have.
actionmax_sizemonthly_spendmax_sandboxesactionstringrequiredWhat was refused: one of the KeyActions, or resume, which
a key past its monthly spend may not.
resizeforkcheckpointportresumeallowedKeyAction[]For limit action, the actions the key may take; possibly none.
currentstringFor the other limits, where the key is, or what it asked for.
maxstringFor the other limits, the key's limit.
Error.
errorobjectrequiredShow propertiesHide properties
codestringrequiredStable machine-readable code: bad_request (400),
unauthorized (401), insufficient_credit (402, no
credit left to start a sandbox), subscription_required
(402, the org needs a subscription to start or wake a
sandbox, see subscription on /v1/balance), forbidden (403),
quota_exceeded (403), trial_limit (403, beyond what a
trial org may run), key_limit (403, beyond the limits the
org set on the calling API key, see key_limit),
not_found (404), conflict (409),
billing_details_required (409, save the billing details
before topping up), topup_not_available (409, the org
cannot top up as it would be taxed; the message says why),
authorization_pending, slow_down and expired_token
(400), and access_denied and approval_pending (403), of
POST /v1/agent-logins/token,
withdrawal_consent_required (409, a consumer orders a
top-up or the subscription only with withdrawal_consent),
desktop_controlled (409, a person viewing the desktop has
taken control of it, see control), idempotency_key_reused
(422, the Idempotency-Key was used for a different
request), rate_limited (429,
see Retry-After), trial_capacity
(429, all trial capacity in use; retry after
Retry-After), host_capacity (429, the host is short of
memory right now, or no host has room for that size, so
nothing new starts there; retry after Retry-After), host_disk
(429, no host's Cloud Hypervisor disk space has room for the
sandbox's disk; retry after Retry-After), internal (500),
runtime_error (502, the sandbox host failed),
payment_provider_error (502, Mollie could not be
reached or refused a payment), github_error (502, GitHub
could not be reached or answered with an error),
sandbox_in_other_org (404, the sandbox is not in the org
the API key acts in but in another org of its user, see
org_id), unavailable (503, the feature is not
configured on this deployment), waking (503, the sandbox is still waking
from standby or booting; retry), server_busy (503, the
sandbox's host has no room to wake it from standby yet;
polsd keeps retrying, retry after Retry-After), host_unavailable
(503, the sandbox is host_down: the server it runs on is
unreachable; retry after Retry-After), unresponsive (503, the
sandbox did not start an exec's command in time, usually
because its memory is full), timeout (504, or 408 when a request
body stalls).
messagestringrequiredcontrolDesktopControlWho has control of a sandbox's desktop. In an error, it is present
only with code desktop_controlled.
Show propertiesHide properties
heldbooleanrequiredSomeone viewing the desktop has taken control of it.
holderstringOnly when held; their name as the desktop's viewers see it, their user's name or else their API key's.
sincestring<date-time>Only when held; when they took control.
expires_atstring<date-time>Only when held; when control lapses unless they use the desktop before.
org_idstringFor sandbox_in_other_org: the org that has the sandbox,
one the key's user belongs to. An API key acts in one org;
use a key of that org to reach the sandbox.
key_limitKeyLimitErrorFor key_limit: which of the calling key's limits the call is
beyond (see Key limits above). Only an org owner or admin can
change them, on https://my.pols.so/account/agents.
Show propertiesHide properties
limitstringrequiredaction: the key may not take action at all; allowed lists
the actions it may take. max_size: current is the size asked
for, max the largest size the key may resize or fork to.
monthly_spend: current is what the key's sandboxes, deleted
ones included, have cost in CPU and RAM this calendar month
(UTC), max its cap, both in EUR like 12.3400; it resets when
the next month starts. max_sandboxes: current is how many
sandboxes the key has that are not deleted, max how many it
may have.
actionmax_sizemonthly_spendmax_sandboxesactionstringrequiredWhat was refused: one of the KeyActions, or resume, which
a key past its monthly spend may not.
resizeforkcheckpointportresumeallowedKeyAction[]For limit action, the actions the key may take; possibly none.
currentstringFor the other limits, where the key is, or what it asked for.
maxstringFor the other limits, the key's limit.