Read-only platform lookups commonly needed before creating a sandbox: organizations, regions, sandbox classes, snapshots, and usage/quota.
{:ok, regions} = ExDaytona.Platform.regions(client)
{:ok, classes} = ExDaytona.Platform.sandbox_classes(client, org_id)
{:ok, %{items: snapshots}} = ExDaytona.Platform.snapshots(client, limit: 10)All helpers return normalized generated models with facade error
handling. Note that organizations/1 requires JWT authentication —
plain API keys receive a 401 from the provider.
Summary
Functions
List the caller's organizations.
List the regions available to the caller.
List the sandbox classes (with GPU availability) an organization can use.
Fetch one snapshot by id or name.
List snapshots with pagination. Accepts :page, :limit, :name,
:sort, :order; returns
{:ok, %{items: [...], page: p, total: n, total_pages: tp}}.
The organization's usage/quota overview (current usage vs. limits).
Functions
@spec organizations(ExDaytona.Client.t()) :: {:ok, [ExDaytona.Model.Organization.t()]} | {:error, ExDaytona.Error.t()}
List the caller's organizations.
JWT only
The provider rejects API-key authentication on this endpoint (401
"Invalid credentials"). Sandbox-scoped code can read its own
organization id from sandbox.info.organizationId instead.
@spec regions(ExDaytona.Client.t()) :: {:ok, [ExDaytona.Model.Region.t()]} | {:error, ExDaytona.Error.t()}
List the regions available to the caller.
@spec sandbox_classes(ExDaytona.Client.t(), String.t()) :: {:ok, [ExDaytona.Model.AvailableSandboxClass.t()]} | {:error, ExDaytona.Error.t()}
List the sandbox classes (with GPU availability) an organization can use.
@spec snapshot(ExDaytona.Client.t(), String.t()) :: {:ok, ExDaytona.Model.SnapshotDto.t()} | {:error, ExDaytona.Error.t()}
Fetch one snapshot by id or name.
@spec snapshots( ExDaytona.Client.t(), keyword() ) :: {:ok, %{ items: [ExDaytona.Model.SnapshotDto.t()], page: non_neg_integer() | nil, total: non_neg_integer() | nil, total_pages: non_neg_integer() | nil }} | {:error, ExDaytona.Error.t()}
List snapshots with pagination. Accepts :page, :limit, :name,
:sort, :order; returns
{:ok, %{items: [...], page: p, total: n, total_pages: tp}}.
@spec usage_overview(ExDaytona.Client.t(), String.t()) :: {:ok, ExDaytona.Model.OrganizationUsageOverview.t()} | {:error, ExDaytona.Error.t()}
The organization's usage/quota overview (current usage vs. limits).