> ## Documentation Index
> Fetch the complete documentation index at: https://docs.novita.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Snapshots

You can list all snapshots, or narrow the list to those created from a specific sandbox.

***

## List snapshots

Call the method and page through the results. Each page is a list of `SnapshotInfo`.

```python Python icon="python" theme={"system"}
from novita_sandbox import Novita

novita = Novita()
paginator = novita.sandbox.list_snapshots(limit=20)

while paginator.has_next:
    snapshots = paginator.next_items()
    for s in snapshots:
        print(s.snapshot_id)
```

```js JavaScript & TypeScript icon="js" theme={"system"}
import { Novita } from 'novita-sandbox'

const novita = new Novita()

const paginator = novita.sandbox.listSnapshots({ limit: 20 })

while (paginator.hasNext) {
  const snapshots = await paginator.nextItems()
  for (const s of snapshots) {
    console.log(s.snapshotId)
  }
}
```

```bash CLI icon="terminal" theme={"system"}
# List snapshots (pretty table output by default)
novita snapshot list

# JSON output
novita snapshot list --output json
```

***

## Filter by source sandbox

Pass a sandbox ID to list only the snapshots created from that sandbox.

```python Python icon="python" theme={"system"}
from novita_sandbox import Novita

novita = Novita()
sandbox_id = "<sandboxID>"
paginator = novita.sandbox.list_snapshots(sandbox_id=sandbox_id)

while paginator.has_next:
    for s in paginator.next_items():
        print(s.snapshot_id)
```

```js JavaScript & TypeScript icon="js" theme={"system"}
import { Novita } from 'novita-sandbox'

const novita = new Novita()
const sandboxId = '<sandboxID>'

const paginator = novita.sandbox.listSnapshots({ sandboxId })

while (paginator.hasNext) {
  for (const s of await paginator.nextItems()) {
    console.log(s.snapshotId)
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.