Time Portal Sandbox API

Write to a command

Send stdin bytes, close stdin (eof), or send a signal to a running command. Use seq starting from 0 to order input requests safely across retries. Stdin closes immediately after stdin_b64 unless stdin_open was enabled when starting the command. Returns 409 if the command has already exited.

POST/v1/time-portal/sandbox/{id}/execs/{exec_id}/input
curl https://api.epochal.com/v1/time-portal/sandbox/sbx_7f3k9q2m4x8p1c6w/execs/exec_m3p8x2k7/input \
  -H "x-api-key: $EPOCHAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "seq": 0,
  "eof": true
}'

The next expected seq.

{
  "next_seq": 1
}

Read the Time Portal Sandbox API guide

A sandbox is a Linux virtual machine whose clock and network are set to an instant.

Authorizations

x-api-key

x-api-keystringRequired

Send your API key in the x-api-key header. Create keys in the console; each belongs to one organization.

Example

"ek_…"

Path parameters

idstringRequired

Unique sandbox ID.

Example

"sbx_7f3k9q2m4x8p1c6w"
exec_idstringRequired

Command ID returned when the command was started.

Example

"exec_m3p8x2k7"

Body

application/json

seqintegerRequired

This call's place in the command's input sequence, from 0.

  • Minimum: 0

data_b64string | null

Bytes for stdin, base64; at most 1 MiB decoded. Upload larger inputs as a file.

eofboolean | null

Close stdin.

  • One of: true, null

signalinteger (int32) | null

Send this signal number to the command, e.g. 15 for SIGTERM.

Response

200

next_seqintegerRequired

The seq the next call must carry.

  • Minimum: 0