Daytona is moving to cursor-based pagination
We're updating how pagination works across the Daytona API, CLI, and SDKs. It's a one-time change, and we want to give you plenty of runway.
What's changing: The offset-based page parameter and the /api/sandbox/paginated endpoint are being replaced by cursor-based pagination. Cursor pagination is faster and stays consistent as data changes underneath you — no skipped or duplicated results when sandboxes are created or removed mid-listing.
The deadline: The deprecated endpoint and page parameter stop working on June 25, 2026.
Who needs to act: Anyone on an SDK or CLI version below v0.180.0. If you're already on v0.180.0 or newer, you're on cursor-based pagination and there's nothing to do.
Migrating your stack
Each migration is small — drop the page argument, and list() now returns an iterator that handles paging for you. Find your language below.
API
Before
1# First page2curl "https://api.daytona.io/api/sandbox/paginated?page=1&limit=10"3# Subsequent pages4curl "https://api.daytona.io/api/sandbox/paginated?page=2&limit=10"
After
1# First page2curl "https://api.daytona.io/api/sandbox?limit=10"3# Subsequent pages4curl "https://api.daytona.io/api/sandbox?cursor=<next_cursor>&limit=10"
The response includes the next cursor — pass it back in to fetch the following page.
CLI
Before
1# First page2daytona sandbox list --page 1 --limit 103# Subsequent pages4daytona sandbox list --page 2 --limit 10
After
1# First page2daytona sandbox list --limit 103# Next page4daytona sandbox list --cursor <next_cursor> --limit 10
Python SDK
Before
1from daytona import Daytona, ListSandboxesQuery23daytona = Daytona()45sandboxes = daytona.list(ListSandboxesQuery(6 states=["started"],7 page=2,8 limit=10,9))
After
1from daytona import Daytona, ListSandboxesQuery, SandboxState23daytona = Daytona()45# Iterate all sandboxes matching the query6for sandbox in daytona.list(ListSandboxesQuery(states=[SandboxState.STARTED], limit=10)):7 print(sandbox.id)
TypeScript SDK
Before
1import { Daytona } from '@daytona/sdk';23const daytona = new Daytona();45const sandboxes = await daytona.list({6 states: ['started'],7 page: 2,8 limit: 10,9});
After
1import { Daytona, SandboxState } from '@daytona/sdk';23const daytona = new Daytona();45// Iterate all sandboxes matching the query6for await (const sandbox of daytona.list({ states: [SandboxState.STARTED], limit: 10 })) {7 console.log(sandbox.id);8}
Go SDK
Before
1import (2 "context"3 "github.com/daytonaio/daytona/libs/sdk-go/pkg/daytona"4)56client, _ := daytona.NewClient()78page, limit := 2, 109sandboxes, _ := client.List(context.Background(), &daytona.ListSandboxesQuery{10 States: []string{"started"},11 Page: &page,12 Limit: &limit,13})
After
1import (2 "context"3 "fmt"4 "log"56 "github.com/daytonaio/daytona/libs/sdk-go/pkg/daytona"7)89client, _ := daytona.NewClient()1011// Iterate all sandboxes matching the query (Go 1.23+ range-over-func)12limit := 1013for sandbox, err := range client.ListSeq(context.Background(), &daytona.ListSandboxesQuery{14 States: []daytona.SandboxState{daytona.SandboxStateStarted},15 Limit: &limit,16}) {17 if err != nil {18 log.Fatal(err)19 }20 fmt.Println(sandbox.ID)21}
Ruby SDK
Before
1require 'daytona'23daytona = Daytona::Daytona.new45sandboxes = daytona.list(Daytona::ListSandboxesQuery.new(6 states: ['started'],7 page: 2,8 limit: 10,9))
After
1require 'daytona'23daytona = Daytona::Daytona.new45# Iterate all sandboxes matching the query6daytona.list(Daytona::ListSandboxesQuery.new(states: [Daytona::SandboxState::STARTED], limit: 10)).each do |sandbox|7 puts sandbox.id8end
Java SDK
Before
1import io.daytona.sdk.Daytona;2import io.daytona.sdk.model.ListSandboxesQuery;3import io.daytona.sdk.model.SandboxState;45Daytona daytona = new Daytona();67ListSandboxesQuery query = new ListSandboxesQuery();8query.setStates(List.of(SandboxState.STARTED));9query.setPage(2);10query.setLimit(10);1112List<Sandbox> sandboxes = daytona.list(query);
After
1import io.daytona.sdk.Daytona;2import io.daytona.sdk.model.ListSandboxesQuery;3import io.daytona.sdk.model.SandboxState;45Daytona daytona = new Daytona();67ListSandboxesQuery query = new ListSandboxesQuery();8query.setStates(List.of(SandboxState.STARTED));9query.setLimit(10);1011// Iterate all sandboxes matching the query12daytona.list(query).forEachRemaining(sandbox -> System.out.println(sandbox.get("id")));
Before you go
Upgrade to v0.180.0 or newer whenever it suits your schedule before June 25. Once you're on it, you're set going forward — no further changes needed.
Questions? Reach us at support@daytona.io or the in-dashboard chat.