Time Portal Sandbox API
Read stdout and stderr frames from the given byte offsets, along with exit once the command finishes. When wait is set, the request waits until new output arrives or the command exits. Keep polling from the updated offsets until exit is present. Output is retained only while the sandbox is live and returns 409 after it ends.
curl https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/execs/exec_m3p8x2k7/output \
-H "x-api-key: $EPOCHAL_API_KEY"Output frames, and the exit status if finished.
{
"frames": [
{
"stream": "stdout",
"offset": 0,
"data_b64": "MjAyNi0wMy0wMQo="
}
],
"exit": {
"reason": "exited",
"code": 0
}
}Read the Time Portal Sandbox API guide
A sandbox is a Linux virtual machine whose clock and network are set to an instant.
x-api-key
Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization.
Example
"ek_…"Unique sandbox ID.
Example
"sbx_7f3k9q2m4x8p1c6w"Command ID returned when the command was started.
Example
"exec_m3p8x2k7"First stdout byte offset to read (the end of what was already read).
Minimum: 0
Default: 0
First stderr byte offset to read.
Minimum: 0
Default: 0
Maximum duration to hold the request until new output arrives or the command exits
(capped at 55s). Returns immediately when unset.
Example
"55s"Maximum output bytes to return across both streams (up to 4 MiB, which is also the default).
Range: 1 to 4194304
200
Output in stream order; empty when wait passed with none.
Stream the bytes came from (stdout or stderr).
Byte offset of the first byte in this stream.
Minimum: 0
Base64-encoded output bytes.
Set once the command has ended and every frame up to its end is in frames; until then,
call again from the end of each stream's last frame.
oneOf (reason)
Command exited with code.
Constant: exited
Exit status code.
curl https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/execs/exec_m3p8x2k7/output \
-H "x-api-key: $EPOCHAL_API_KEY"Output frames, and the exit status if finished.
{
"frames": [
{
"stream": "stdout",
"offset": 0,
"data_b64": "MjAyNi0wMy0wMQo="
}
],
"exit": {
"reason": "exited",
"code": 0
}
}