ExDaytona.Api.Sandbox (ex_daytona v0.3.0)

Copy Markdown View Source

API calls for all endpoints tagged Sandbox.

Summary

Functions

Create sandbox backup Deprecated: backups are managed automatically. This endpoint is a no-op kept for compatibility.

Get build logs This endpoint is deprecated. Use getBuildLogsUrl instead.

Get sandbox details Sandboxes destroyed by spot preemption remain retrievable for 24 hours so spotEvictedAt can be read.

Get sandbox logs Retrieve OTEL logs for a sandbox within a time range

Get sandbox metrics Retrieve OTEL metrics for a sandbox within a time range

Get trace spans Retrieve all spans for a specific trace

Get sandbox traces Retrieve OTEL traces for a sandbox within a time range

Get sandboxes for the authenticated runner

Get toolbox proxy URL for a sandbox

List sandboxes Advanced filtering and ordering. Eventually consistent.

[DEPRECATED] List all sandboxes paginated

Rotate the signing key, invalidating all previously signed URLs

Start or resume sandbox Starts a stopped or archived sandbox, or resumes a paused sandbox. The transition taken depends on the current sandbox state.

Update sandbox network settings Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).

Update sandbox secrets Replaces the set of vault secrets mounted in the sandbox. Attached, detached and rotated secrets take effect for outbound requests within seconds. New env vars become visible to processes spawned after the update; a sandbox created without any secrets must be restarted for newly attached secrets to work.

Validate SSH access for sandbox

Functions

archive_sandbox(connection, sandbox_id_or_name, opts \\ [])

@spec archive_sandbox(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Archive sandbox

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

create_backup(connection, sandbox_id_or_name, opts \\ [])

@spec create_backup(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Create sandbox backup Deprecated: backups are managed automatically. This endpoint is a no-op kept for compatibility.

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

create_sandbox(connection, create_sandbox, opts \\ [])

@spec create_sandbox(Tesla.Env.client(), ExDaytona.Model.CreateSandbox.t(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Create a new sandbox

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • create_sandbox (CreateSandbox):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

create_sandbox_snapshot(connection, sandbox_id_or_name, create_sandbox_snapshot, opts \\ [])

@spec create_sandbox_snapshot(
  Tesla.Env.client(),
  String.t(),
  ExDaytona.Model.CreateSandboxSnapshot.t(),
  keyword()
) :: {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Create a snapshot from a sandbox

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t):
  • create_sandbox_snapshot (CreateSandboxSnapshot):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

create_ssh_access(connection, sandbox_id_or_name, opts \\ [])

@spec create_ssh_access(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.SshAccessDto.t()} | {:error, Tesla.Env.t()}

Create SSH access for sandbox

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :expiresInMinutes (number()): Expiration time in minutes (default: 60)

Returns

  • {:ok, ExDaytona.Model.SshAccessDto.t} on success
  • {:error, Tesla.Env.t} on failure

delete_sandbox(connection, sandbox_id_or_name, opts \\ [])

@spec delete_sandbox(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Delete sandbox

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

expire_signed_port_preview_url(connection, sandbox_id_or_name, port, token, opts \\ [])

@spec expire_signed_port_preview_url(
  Tesla.Env.client(),
  String.t(),
  integer(),
  String.t(),
  keyword()
) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Expire signed preview URL for a sandbox port

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • port (integer()): Port number to expire signed preview URL for
  • token (String.t): Token to expire signed preview URL for
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

fork_sandbox(connection, sandbox_id_or_name, fork_sandbox, opts \\ [])

@spec fork_sandbox(
  Tesla.Env.client(),
  String.t(),
  ExDaytona.Model.ForkSandbox.t(),
  keyword()
) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Fork a sandbox

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t):
  • fork_sandbox (ForkSandbox):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

get_build_logs(connection, sandbox_id_or_name, opts \\ [])

@spec get_build_logs(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Get build logs This endpoint is deprecated. Use getBuildLogsUrl instead.

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :follow (boolean()): Whether to follow the logs stream

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

get_build_logs_url(connection, sandbox_id_or_name, opts \\ [])

@spec get_build_logs_url(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Url.t()} | {:error, Tesla.Env.t()}

Get build logs URL

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Url.t} on success
  • {:error, Tesla.Env.t} on failure

get_organization_by_sandbox_id(connection, sandbox_id, opts \\ [])

@spec get_organization_by_sandbox_id(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Organization.t()} | {:error, Tesla.Env.t()}

Get organization by sandbox ID

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t): ID of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Organization.t} on success
  • {:error, Tesla.Env.t} on failure

get_port_preview_url(connection, sandbox_id_or_name, port, opts \\ [])

@spec get_port_preview_url(Tesla.Env.client(), String.t(), number(), keyword()) ::
  {:ok, ExDaytona.Model.PortPreviewUrl.t()} | {:error, Tesla.Env.t()}

Get preview URL for a sandbox port

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • port (number()): Port number to get preview URL for
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.PortPreviewUrl.t} on success
  • {:error, Tesla.Env.t} on failure

get_region_quota_by_sandbox_id(connection, sandbox_id, opts \\ [])

@spec get_region_quota_by_sandbox_id(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.RegionQuota.t()} | {:error, Tesla.Env.t()}

Get region quota by sandbox ID

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t): ID of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.RegionQuota.t} on success
  • {:error, Tesla.Env.t} on failure

get_sandbox(connection, sandbox_id_or_name, opts \\ [])

@spec get_sandbox(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Get sandbox details Sandboxes destroyed by spot preemption remain retrievable for 24 hours so spotEvictedAt can be read.

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :verbose (boolean()): Include verbose output

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

get_sandbox_ancestors(connection, sandbox_id_or_name, opts \\ [])

@spec get_sandbox_ancestors(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, [ExDaytona.Model.Sandbox.t()]} | {:error, Tesla.Env.t()}

Get sandbox fork ancestor chain

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, [%Sandbox{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

get_sandbox_forks(connection, sandbox_id_or_name, opts \\ [])

@spec get_sandbox_forks(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, [ExDaytona.Model.Sandbox.t()]} | {:error, Tesla.Env.t()}

Get sandbox fork children

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :includeDestroyed (boolean()):

Returns

  • {:ok, [%Sandbox{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

get_sandbox_logs(connection, sandbox_id, from, to, opts \\ [])

@spec get_sandbox_logs(
  Tesla.Env.client(),
  String.t(),
  DateTime.t(),
  DateTime.t(),
  keyword()
) ::
  {:ok, ExDaytona.Model.PaginatedLogs.t()} | {:error, Tesla.Env.t()}

Get sandbox logs Retrieve OTEL logs for a sandbox within a time range

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t): ID of the sandbox
  • from (DateTime.t): Start of time range (ISO 8601)
  • to (DateTime.t): End of time range (ISO 8601)
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :page (number()): Page number (1-indexed)
    • :limit (number()): Number of items per page
    • :severities ([String.t]): Filter by severity levels (DEBUG, INFO, WARN, ERROR)
    • :search (String.t): Search in log body

Returns

  • {:ok, ExDaytona.Model.PaginatedLogs.t} on success
  • {:error, Tesla.Env.t} on failure

get_sandbox_metrics(connection, sandbox_id, from, to, opts \\ [])

@spec get_sandbox_metrics(
  Tesla.Env.client(),
  String.t(),
  DateTime.t(),
  DateTime.t(),
  keyword()
) ::
  {:ok, ExDaytona.Model.MetricsResponse.t()} | {:error, Tesla.Env.t()}

Get sandbox metrics Retrieve OTEL metrics for a sandbox within a time range

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t): ID of the sandbox
  • from (DateTime.t): Start of time range (ISO 8601)
  • to (DateTime.t): End of time range (ISO 8601)
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :metricNames ([String.t]): Filter by metric names

Returns

  • {:ok, ExDaytona.Model.MetricsResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_sandbox_parent(connection, sandbox_id_or_name, opts \\ [])

@spec get_sandbox_parent(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Get sandbox fork parent

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

get_sandbox_signing_key(connection, sandbox_id, opts \\ [])

@spec get_sandbox_signing_key(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, String.t()} | {:error, Tesla.Env.t()}

Get the signing key for a sandbox

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t): ID of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

get_sandbox_trace_spans(connection, sandbox_id, trace_id, opts \\ [])

@spec get_sandbox_trace_spans(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, [ExDaytona.Model.TraceSpan.t()]} | {:error, Tesla.Env.t()}

Get trace spans Retrieve all spans for a specific trace

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t): ID of the sandbox
  • trace_id (String.t): ID of the trace
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, [%TraceSpan{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

get_sandbox_traces(connection, sandbox_id, from, to, opts \\ [])

@spec get_sandbox_traces(
  Tesla.Env.client(),
  String.t(),
  DateTime.t(),
  DateTime.t(),
  keyword()
) ::
  {:ok, ExDaytona.Model.PaginatedTraces.t()} | {:error, Tesla.Env.t()}

Get sandbox traces Retrieve OTEL traces for a sandbox within a time range

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t): ID of the sandbox
  • from (DateTime.t): Start of time range (ISO 8601)
  • to (DateTime.t): End of time range (ISO 8601)
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :page (number()): Page number (1-indexed)
    • :limit (number()): Number of items per page

Returns

  • {:ok, ExDaytona.Model.PaginatedTraces.t} on success
  • {:error, Tesla.Env.t} on failure

get_sandboxes_for_runner(connection, opts \\ [])

@spec get_sandboxes_for_runner(
  Tesla.Env.client(),
  keyword()
) :: {:ok, [ExDaytona.Model.Sandbox.t()]} | {:error, Tesla.Env.t()}

Get sandboxes for the authenticated runner

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :states (String.t): Comma-separated list of sandbox states to filter by
    • :skipReconcilingSandboxes (boolean()): Skip sandboxes where state differs from desired state

Returns

  • {:ok, [%Sandbox{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

get_signed_port_preview_url(connection, sandbox_id_or_name, port, opts \\ [])

@spec get_signed_port_preview_url(
  Tesla.Env.client(),
  String.t(),
  integer(),
  keyword()
) ::
  {:ok, ExDaytona.Model.SignedPortPreviewUrl.t()} | {:error, Tesla.Env.t()}

Get signed preview URL for a sandbox port

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • port (integer()): Port number to get signed preview URL for
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :expiresInSeconds (integer()): Expiration time in seconds (default: 60 seconds)

Returns

  • {:ok, ExDaytona.Model.SignedPortPreviewUrl.t} on success
  • {:error, Tesla.Env.t} on failure

get_toolbox_proxy_url(connection, sandbox_id, opts \\ [])

@spec get_toolbox_proxy_url(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.ToolboxProxyUrl.t()} | {:error, Tesla.Env.t()}

Get toolbox proxy URL for a sandbox

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t): ID of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.ToolboxProxyUrl.t} on success
  • {:error, Tesla.Env.t} on failure

list_sandboxes(connection, opts \\ [])

@spec list_sandboxes(
  Tesla.Env.client(),
  keyword()
) :: {:ok, ExDaytona.Model.ListSandboxesResponse.t()} | {:error, Tesla.Env.t()}

List sandboxes Advanced filtering and ordering. Eventually consistent.

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :cursor (String.t): Pagination cursor from a previous response
    • :limit (number()): Number of results per page
    • :id (String.t): Filter by ID prefix (case-insensitive)
    • :name (String.t): Filter by name prefix (case-insensitive)
    • :labels (String.t): JSON encoded labels to filter by
    • :includeErroredDeleted (boolean()): Include results with errored state and deleted desired state
    • :includeWarm (boolean()): Include unclaimed warm pool sandboxes (excluded by default)
    • :states ([ExDaytona.Model.SandboxState.t]): List of states to filter by.
    • :snapshots ([String.t]): List of snapshot names to filter by
    • :regionIds ([String.t]): List of regions IDs to filter by
    • :sandboxClasses ([ExDaytona.Model.SandboxClass.t]): List of sandbox classes to filter by
    • :minCpu (number()): Minimum CPU
    • :maxCpu (number()): Maximum CPU
    • :minMemoryGiB (number()): Minimum memory in GiB
    • :maxMemoryGiB (number()): Maximum memory in GiB
    • :minDiskGiB (number()): Minimum disk space in GiB
    • :maxDiskGiB (number()): Maximum disk space in GiB
    • :isPublic (boolean()): Filter by public status
    • :isRecoverable (boolean()): Filter by recoverable status
    • :createdAtAfter (DateTime.t): Include items created after this timestamp
    • :createdAtBefore (DateTime.t): Include items created before this timestamp
    • :lastEventAfter (DateTime.t): Include items with last event after this timestamp
    • :lastEventBefore (DateTime.t): Include items with last event before this timestamp
    • :autoDestroyAtAfter (DateTime.t): Include items scheduled for auto destroy after this timestamp
    • :autoDestroyAtBefore (DateTime.t): Include items scheduled for auto destroy before this timestamp
    • :sort (SandboxListSortField): Field to sort by
    • :order (SandboxListSortDirection): Direction to sort by

Returns

  • {:ok, ExDaytona.Model.ListSandboxesResponse.t} on success
  • {:error, Tesla.Env.t} on failure

list_sandboxes_paginated_deprecated(connection, opts \\ [])

@spec list_sandboxes_paginated_deprecated(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.PaginatedSandboxesDeprecated.t()}
  | {:error, Tesla.Env.t()}

[DEPRECATED] List all sandboxes paginated

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :page (number()): Page number of the results
    • :limit (number()): Number of results per page
    • :id (String.t): Filter by partial ID match
    • :name (String.t): Filter by partial name match
    • :labels (String.t): JSON encoded labels to filter by
    • :includeErroredDeleted (boolean()): Include results with errored state and deleted desired state
    • :states ([String.t]): List of states to filter by
    • :snapshots ([String.t]): List of snapshot names to filter by
    • :regions ([String.t]): List of regions to filter by
    • :minCpu (number()): Minimum CPU
    • :maxCpu (number()): Maximum CPU
    • :minMemoryGiB (number()): Minimum memory in GiB
    • :maxMemoryGiB (number()): Maximum memory in GiB
    • :minDiskGiB (number()): Minimum disk space in GiB
    • :maxDiskGiB (number()): Maximum disk space in GiB
    • :lastEventAfter (DateTime.t): Include items with last event after this timestamp
    • :lastEventBefore (DateTime.t): Include items with last event before this timestamp
    • :sort (String.t): Field to sort by
    • :order (String.t): Direction to sort by

Returns

  • {:ok, ExDaytona.Model.PaginatedSandboxesDeprecated.t} on success
  • {:error, Tesla.Env.t} on failure

pause_sandbox(connection, sandbox_id_or_name, opts \\ [])

@spec pause_sandbox(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Pause sandbox

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

recover_sandbox(connection, sandbox_id_or_name, opts \\ [])

@spec recover_sandbox(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Recover sandbox from error state

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :skipStart (boolean()): If true, the sandbox is left in STOPPED after recovery instead of being started.

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

replace_labels(connection, sandbox_id_or_name, sandbox_labels, opts \\ [])

Replace sandbox labels

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • sandbox_labels (SandboxLabels):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.SandboxLabels.t} on success
  • {:error, Tesla.Env.t} on failure

resize_sandbox(connection, sandbox_id_or_name, resize_sandbox, opts \\ [])

@spec resize_sandbox(
  Tesla.Env.client(),
  String.t(),
  ExDaytona.Model.ResizeSandbox.t(),
  keyword()
) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Resize sandbox resources

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • resize_sandbox (ResizeSandbox):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

resolve_sandbox_secrets(connection, sandbox_id, opts \\ [])

@spec resolve_sandbox_secrets(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, [ExDaytona.Model.ResolveSandboxSecrets200ResponseInner.t()]}
  | {:error, Tesla.Env.t()}

Resolve sandbox secrets

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t): Sandbox ID
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, [%ResolveSandboxSecrets200ResponseInner{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

revoke_ssh_access(connection, sandbox_id_or_name, opts \\ [])

@spec revoke_ssh_access(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Revoke SSH access for sandbox

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :token (String.t): SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

rotate_signing_key(connection, sandbox_id, opts \\ [])

@spec rotate_signing_key(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, String.t()} | {:error, Tesla.Env.t()}

Rotate the signing key, invalidating all previously signed URLs

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t): ID of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

set_auto_archive_interval(connection, sandbox_id_or_name, interval, opts \\ [])

@spec set_auto_archive_interval(Tesla.Env.client(), String.t(), number(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Set sandbox auto-archive interval

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • interval (number()): Auto-archive interval in minutes (0 means the maximum interval will be used)
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

set_auto_delete_interval(connection, sandbox_id_or_name, interval, opts \\ [])

@spec set_auto_delete_interval(Tesla.Env.client(), String.t(), number(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Set sandbox auto-delete interval

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • interval (number()): Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

set_auto_pause_interval(connection, sandbox_id_or_name, interval, opts \\ [])

@spec set_auto_pause_interval(Tesla.Env.client(), String.t(), number(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Set sandbox auto-pause interval

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • interval (number()): Auto-pause interval in minutes (0 to disable)
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

set_autostop_interval(connection, sandbox_id_or_name, interval, opts \\ [])

@spec set_autostop_interval(Tesla.Env.client(), String.t(), number(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Set sandbox auto-stop interval

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • interval (number()): Auto-stop interval in minutes (0 to disable)
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

set_ttl(connection, sandbox_id_or_name, ttl_minutes, opts \\ [])

@spec set_ttl(Tesla.Env.client(), String.t(), number(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Set sandbox TTL

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • ttl_minutes (number()): Maximum time to live in minutes, re-anchored from the current time (0 to disable). When it elapses the sandbox is destroyed, even if it is stopped, paused, or archived
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

start_sandbox(connection, sandbox_id_or_name, opts \\ [])

@spec start_sandbox(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Start or resume sandbox Starts a stopped or archived sandbox, or resumes a paused sandbox. The transition taken depends on the current sandbox state.

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

stop_sandbox(connection, sandbox_id_or_name, opts \\ [])

@spec stop_sandbox(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Stop sandbox

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :force (boolean()): Force stop the sandbox using SIGKILL instead of SIGTERM

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

update_last_activity(connection, sandbox_id, opts \\ [])

@spec update_last_activity(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Update sandbox last activity

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t): ID of the sandbox
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :body (UpdateLastActivity):

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

update_network_settings(connection, sandbox_id_or_name, update_sandbox_network_settings, opts \\ [])

@spec update_network_settings(
  Tesla.Env.client(),
  String.t(),
  ExDaytona.Model.UpdateSandboxNetworkSettings.t(),
  keyword()
) :: {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Update sandbox network settings Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • update_sandbox_network_settings (UpdateSandboxNetworkSettings):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

update_public_status(connection, sandbox_id_or_name, is_public, opts \\ [])

@spec update_public_status(Tesla.Env.client(), String.t(), boolean(), keyword()) ::
  {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Update public status

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • is_public (boolean()): Public status to set
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

update_sandbox_secrets(connection, sandbox_id_or_name, update_sandbox_secrets, opts \\ [])

@spec update_sandbox_secrets(
  Tesla.Env.client(),
  String.t(),
  ExDaytona.Model.UpdateSandboxSecrets.t(),
  keyword()
) :: {:ok, ExDaytona.Model.Sandbox.t()} | {:error, Tesla.Env.t()}

Update sandbox secrets Replaces the set of vault secrets mounted in the sandbox. Attached, detached and rotated secrets take effect for outbound requests within seconds. New env vars become visible to processes spawned after the update; a sandbox created without any secrets must be restarted for newly attached secrets to work.

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id_or_name (String.t): ID or name of the sandbox
  • update_sandbox_secrets (UpdateSandboxSecrets):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Sandbox.t} on success
  • {:error, Tesla.Env.t} on failure

update_sandbox_state(connection, sandbox_id, update_sandbox_state_dto, opts \\ [])

@spec update_sandbox_state(
  Tesla.Env.client(),
  String.t(),
  ExDaytona.Model.UpdateSandboxStateDto.t(),
  keyword()
) :: {:ok, nil} | {:error, Tesla.Env.t()}

Update sandbox state

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t): ID of the sandbox
  • update_sandbox_state_dto (UpdateSandboxStateDto):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

validate_ssh_access(connection, token, opts \\ [])

@spec validate_ssh_access(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.SshAccessValidationDto.t()} | {:error, Tesla.Env.t()}

Validate SSH access for sandbox

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • token (String.t): SSH access token to validate
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.SshAccessValidationDto.t} on success
  • {:error, Tesla.Env.t} on failure