Skip to main content

sandbox_checkpoints

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

Overview​

Namesandbox_checkpoints
TypeResource
Idrailway.agents.sandbox_checkpoints

Fields​

The following fields are returned by SELECT queries:

One row per SandboxCheckpoint. A bootable snapshot of a sandbox's disk, scoped to an environment. Built from a template recipe or captured from a running sandbox.

NameDatatypeDescription
idstring
environment_idstring
created_atstring (date-time)
keystringThe checkpoint's identity within the environment (same as id): a recipe content hash for a built template, or the user-given name for one captured from a sandbox.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectenvironment_idList named sandbox checkpoints in an environment. Backed by the Railway GraphQL query sandboxCheckpoints.
createinsertenvironment_id, name, sandbox_idCapture a running sandbox's current disk into a reusable, named checkpoint. Synchronous: the checkpoint is ready when this returns. Backed by the Railway GraphQL mutation sandboxCheckpointCreate.
renameupdateenvironment_id, id, nameRename a sandbox checkpoint. Backed by the Railway GraphQL mutation sandboxCheckpointRename.
deletedeleteenvironment_id, idDelete a sandbox checkpoint. Backed by the Railway GraphQL mutation sandboxCheckpointDelete.

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
namestring
sandbox_idstring

SELECT examples​

List named sandbox checkpoints in an environment. Backed by the Railway GraphQL query sandboxCheckpoints.

SELECT
id,
environment_id,
created_at,
key
FROM railway.agents.sandbox_checkpoints
WHERE environment_id = '{{ environment_id }}' -- required
;

INSERT examples​

Capture a running sandbox's current disk into a reusable, named checkpoint. Synchronous: the checkpoint is ready when this returns. Backed by the Railway GraphQL mutation sandboxCheckpointCreate.

INSERT INTO railway.agents.sandbox_checkpoints (
environment_id,
name,
sandbox_id
)
SELECT
'{{ environment_id }}' /* required */,
'{{ name }}' /* required */,
'{{ sandbox_id }}' /* required */
RETURNING
id,
environment_id,
created_at,
key
;

UPDATE examples​

Rename a sandbox checkpoint. Backed by the Railway GraphQL mutation sandboxCheckpointRename.

UPDATE railway.agents.sandbox_checkpoints
SET

WHERE
environment_id = '{{ environment_id }}' --required
AND id = '{{ id }}' --required
AND name = '{{ name }}' --required
RETURNING
id,
environment_id,
created_at,
key;

DELETE examples​

Delete a sandbox checkpoint. Backed by the Railway GraphQL mutation sandboxCheckpointDelete.

DELETE FROM railway.agents.sandbox_checkpoints
WHERE
environment_id = '{{ environment_id }}' --required
AND id = '{{ id }}' --required
;