Skip to main content

sandbox_sessions

Creates, updates, deletes, gets or lists a sandbox_sessions resource.

Overview​

Namesandbox_sessions
TypeResource
Idrailway.agents.sandbox_sessions

Fields​

The following fields are returned by SELECT queries:

One row per SandboxSession. A resumable session inside a sandbox: an interactive shell or a one-off exec command.

NameDatatypeDescription
namestringStable session name; reconnect/attach by this.
attachedbooleanWhether a client is currently connected.
commandstringThe command being run; empty for an interactive shell.
created_atstring (date-time)
foreground_activebooleanFor an interactive shell, whether a foreground program currently holds the terminal. Null otherwise, or when the runtime can't report it.
kindstring (EXEC, SHELL)
run_stateobjectSandboxSessionRunState object

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectenvironment_id, idResumable sessions inside a sandbox — interactive shells and one-off exec commands, live or recently exited. Null when the sandbox can't report them (e.g. its vm-init predates session listing). Backed by the Railway GraphQL query sandboxSessions.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
environment_idstring
idstring

SELECT examples​

Resumable sessions inside a sandbox — interactive shells and one-off exec commands, live or recently exited. Null when the sandbox can't report them (e.g. its vm-init predates session listing). Backed by the Railway GraphQL query sandboxSessions.

SELECT
name,
attached,
command,
created_at,
foreground_active,
kind,
run_state
FROM railway.agents.sandbox_sessions
WHERE environment_id = '{{ environment_id }}' -- required
AND id = '{{ id }}' -- required
;