MAY 25 2026 // 3 min read

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 page
2curl "https://api.daytona.io/api/sandbox/paginated?page=1&limit=10"
3# Subsequent pages
4curl "https://api.daytona.io/api/sandbox/paginated?page=2&limit=10"

After

1# First page
2curl "https://api.daytona.io/api/sandbox?limit=10"
3# Subsequent pages
4curl "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 page
2daytona sandbox list --page 1 --limit 10
3# Subsequent pages
4daytona sandbox list --page 2 --limit 10

After

1# First page
2daytona sandbox list --limit 10
3# Next page
4daytona sandbox list --cursor <next_cursor> --limit 10
Python SDK

Before

1from daytona import Daytona, ListSandboxesQuery
2
3daytona = Daytona()
4
5sandboxes = daytona.list(ListSandboxesQuery(
6 states=["started"],
7 page=2,
8 limit=10,
9))

After

1from daytona import Daytona, ListSandboxesQuery, SandboxState
2
3daytona = Daytona()
4
5# Iterate all sandboxes matching the query
6for sandbox in daytona.list(ListSandboxesQuery(states=[SandboxState.STARTED], limit=10)):
7 print(sandbox.id)
TypeScript SDK

Before

1import { Daytona } from '@daytona/sdk';
2
3const daytona = new Daytona();
4
5const sandboxes = await daytona.list({
6 states: ['started'],
7 page: 2,
8 limit: 10,
9});

After

1import { Daytona, SandboxState } from '@daytona/sdk';
2
3const daytona = new Daytona();
4
5// Iterate all sandboxes matching the query
6for 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)
5
6client, _ := daytona.NewClient()
7
8page, limit := 2, 10
9sandboxes, _ := 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"
5
6 "github.com/daytonaio/daytona/libs/sdk-go/pkg/daytona"
7)
8
9client, _ := daytona.NewClient()
10
11// Iterate all sandboxes matching the query (Go 1.23+ range-over-func)
12limit := 10
13for 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'
2
3daytona = Daytona::Daytona.new
4
5sandboxes = daytona.list(Daytona::ListSandboxesQuery.new(
6 states: ['started'],
7 page: 2,
8 limit: 10,
9))

After

1require 'daytona'
2
3daytona = Daytona::Daytona.new
4
5# Iterate all sandboxes matching the query
6daytona.list(Daytona::ListSandboxesQuery.new(states: [Daytona::SandboxState::STARTED], limit: 10)).each do |sandbox|
7 puts sandbox.id
8end
Java SDK

Before

1import io.daytona.sdk.Daytona;
2import io.daytona.sdk.model.ListSandboxesQuery;
3import io.daytona.sdk.model.SandboxState;
4
5Daytona daytona = new Daytona();
6
7ListSandboxesQuery query = new ListSandboxesQuery();
8query.setStates(List.of(SandboxState.STARTED));
9query.setPage(2);
10query.setLimit(10);
11
12List<Sandbox> sandboxes = daytona.list(query);

After

1import io.daytona.sdk.Daytona;
2import io.daytona.sdk.model.ListSandboxesQuery;
3import io.daytona.sdk.model.SandboxState;
4
5Daytona daytona = new Daytona();
6
7ListSandboxesQuery query = new ListSandboxesQuery();
8query.setStates(List.of(SandboxState.STARTED));
9query.setLimit(10);
10
11// Iterate all sandboxes matching the query
12daytona.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.

other updates

Newsletter