Checkpoints

Checkpoints capture your Sprite's complete filesystem state for instant rollback. They're live snapshots—creation takes milliseconds with no interruption to running processes.

Use checkpoints before risky operations, to create reproducible environments, or to share known-good states across a team. Copy-on-write storage keeps incremental checkpoints small; you only store what changed.

sprite-env

Checkpoints

Create Checkpoint

Create a new checkpoint of the current sprite state. Returns streaming NDJSON progress.

POST /sprites/{name}/checkpoint

Request Body

application/json
comment? string

Response Body

application/x-ndjson
StreamInfoEvent
type* "info"
data* String

Status message

time* DateTime

Timestamp

StreamErrorEvent
type* "error"
error* String

Error description

time* DateTime

Timestamp

StreamCompleteEvent
type* "complete"
data* String

Completion message

time* DateTime

Timestamp

Response Codes

200

Success - Streaming NDJSON response

404

Not Found - Resource not found

500

Internal Server Error

bash
curl -X POST \
  "https://api.sprites.dev/v1/sprites/{name}/checkpoint" \
  -H "Authorization: Bearer $SPRITES_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"comment":"Before deploying v2.0"}'
200 Response
[
  {
    "data": "Creating checkpoint...",
    "time": "2026-01-05T10:30:00Z",
    "type": "info"
  },
  {
    "data": "Stopping services...",
    "time": "2026-01-05T10:30:00Z",
    "type": "info"
  },
  {
    "data": "Saving filesystem state...",
    "time": "2026-01-05T10:30:00Z",
    "type": "info"
  },
  {
    "data": "Checkpoint v8 created",
    "time": "2026-01-05T10:30:00Z",
    "type": "complete"
  }
]

Checkpoints

List Checkpoints

List all checkpoints.

GET /sprites/{name}/checkpoints

Response Body

application/json
id* string

Checkpoint identifier (e.g., v7)

create_time* string

When the checkpoint was created

source_id? string

Parent checkpoint ID

comment? string

User-provided description

health? string

Health status (empty = healthy, "mount_failed" = unhealthy)

Response Codes

200

Success

404

Not Found - Resource not found

500

Internal Server Error

bash
curl -X GET \
  "https://api.sprites.dev/v1/sprites/{name}/checkpoints" \
  -H "Authorization: Bearer $SPRITES_TOKEN"
200 Response
[
  {
    "comment": "Before database migration",
    "create_time": "2026-01-05T10:30:00Z",
    "id": "v7"
  },
  {
    "comment": "Stable state",
    "create_time": "2026-01-04T15:00:00Z",
    "id": "v6"
  },
  {
    "comment": "",
    "create_time": "2026-01-04T09:00:00Z",
    "id": "v5"
  }
]

Checkpoints

Get Checkpoint

Get details of a specific checkpoint.

GET /sprites/{name}/checkpoints/{checkpoint_id}

Response Body

application/json
id* string

Checkpoint identifier (e.g., v7)

create_time* string

When the checkpoint was created

source_id? string

Parent checkpoint ID

comment? string

User-provided description

health? string

Health status (empty = healthy, "mount_failed" = unhealthy)

Response Codes

200

Success

404

Not Found - Resource not found

500

Internal Server Error

bash
curl -X GET \
  "https://api.sprites.dev/v1/sprites/{name}/checkpoints/{checkpoint_id}" \
  -H "Authorization: Bearer $SPRITES_TOKEN"
200 Response
{
  "comment": "Before database migration",
  "create_time": "2026-01-05T10:30:00Z",
  "id": "v7"
}

Checkpoints

Restore Checkpoint

Restore to a specific checkpoint. Returns streaming NDJSON progress.

POST /sprites/{name}/checkpoints/{checkpoint_id}/restore

Response Body

application/x-ndjson
StreamInfoEvent
type* "info"
data* String

Status message

time* DateTime

Timestamp

StreamErrorEvent
type* "error"
error* String

Error description

time* DateTime

Timestamp

StreamCompleteEvent
type* "complete"
data* String

Completion message

time* DateTime

Timestamp

Response Codes

200

Success - Streaming NDJSON response

404

Not Found - Resource not found

500

Internal Server Error

bash
curl -X POST \
  "https://api.sprites.dev/v1/sprites/{name}/checkpoints/{checkpoint_id}/restore" \
  -H "Authorization: Bearer $SPRITES_TOKEN"
200 Response
[
  {
    "data": "Restoring to checkpoint v5...",
    "time": "2026-01-05T10:30:00Z",
    "type": "info"
  },
  {
    "data": "Stopping services...",
    "time": "2026-01-05T10:30:00Z",
    "type": "info"
  },
  {
    "data": "Restoring filesystem...",
    "time": "2026-01-05T10:30:00Z",
    "type": "info"
  },
  {
    "data": "Restored to v5",
    "time": "2026-01-05T10:30:00Z",
    "type": "complete"
  }
]