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.

Create Checkpoint

POST /v1/sprites/{name}/checkpoint

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

Request Body

application/json
comment string

Response

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"
  }
]

List Checkpoints

GET /v1/sprites/{name}/checkpoints

List all checkpoints.

Response

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

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"
  }
]

Get Checkpoint

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

Get details of a specific checkpoint.

Response

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

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"
}

Restore Checkpoint

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

Restore to a specific checkpoint. Returns streaming NDJSON progress.

Response

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"
  }
]