openapi: 3.1.0 info: title: Daytona admin sandbox API description: Daytona AI platform API Docs version: '1.0' contact: name: Daytona Platforms Inc. url: https://www.daytona.io email: support@daytona.com license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0 servers: - url: http://localhost:3000 tags: - name: sandbox paths: /sandbox: get: operationId: listSandboxes parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: verbose required: false in: query description: Include verbose output schema: type: boolean - name: labels required: false in: query description: JSON encoded labels to filter by schema: example: '{"label1": "value1", "label2": "value2"}' type: string - name: includeErroredDeleted required: false in: query description: Include errored and deleted sandboxes schema: type: boolean responses: '200': description: List of all sandboxes content: application/json: schema: type: array items: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: List all sandboxes tags: - sandbox post: operationId: createSandbox parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateSandbox' responses: '200': description: The sandbox has been successfully created. content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Create a new sandbox tags: - sandbox /sandbox/paginated: get: operationId: listSandboxesPaginated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: page required: false in: query description: Page number of the results schema: minimum: 1 default: 1 type: number - name: limit required: false in: query description: Number of results per page schema: minimum: 1 maximum: 200 default: 100 type: number - name: id required: false in: query description: Filter by partial ID match schema: example: abc123 type: string - name: name required: false in: query description: Filter by partial name match schema: example: abc123 type: string - name: labels required: false in: query description: JSON encoded labels to filter by schema: example: '{"label1": "value1", "label2": "value2"}' type: string - name: includeErroredDeleted required: false in: query description: Include results with errored state and deleted desired state schema: default: false type: boolean - name: states required: false in: query description: List of states to filter by schema: type: array items: type: string enum: - creating - restoring - destroying - started - stopped - starting - stopping - error - build_failed - pending_build - building_snapshot - unknown - pulling_snapshot - archived - archiving - resizing - snapshotting - forking - name: snapshots required: false in: query description: List of snapshot names to filter by schema: type: array items: type: string - name: regions required: false in: query description: List of regions to filter by schema: type: array items: type: string - name: minCpu required: false in: query description: Minimum CPU schema: minimum: 1 type: number - name: maxCpu required: false in: query description: Maximum CPU schema: minimum: 1 type: number - name: minMemoryGiB required: false in: query description: Minimum memory in GiB schema: minimum: 1 type: number - name: maxMemoryGiB required: false in: query description: Maximum memory in GiB schema: minimum: 1 type: number - name: minDiskGiB required: false in: query description: Minimum disk space in GiB schema: minimum: 1 type: number - name: maxDiskGiB required: false in: query description: Maximum disk space in GiB schema: minimum: 1 type: number - name: lastEventAfter required: false in: query description: Include items with last event after this timestamp schema: format: date-time example: '2024-01-01T00:00:00Z' type: string - name: lastEventBefore required: false in: query description: Include items with last event before this timestamp schema: format: date-time example: '2024-12-31T23:59:59Z' type: string - name: sort required: false in: query description: Field to sort by schema: default: createdAt type: string enum: - id - name - state - snapshot - region - updatedAt - createdAt - lastActivityAt - name: order required: false in: query description: Direction to sort by schema: default: desc type: string enum: - asc - desc responses: '200': description: Paginated list of all sandboxes content: application/json: schema: $ref: '#/components/schemas/PaginatedSandboxes' security: - bearer: [] - oauth2: - openid - profile - email summary: List all sandboxes paginated tags: - sandbox /sandbox/for-runner: get: operationId: getSandboxesForRunner parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: states required: false in: query description: Comma-separated list of sandbox states to filter by schema: type: string - name: skipReconcilingSandboxes required: false in: query description: Skip sandboxes where state differs from desired state schema: type: boolean responses: '200': description: List of sandboxes for the authenticated runner content: application/json: schema: type: array items: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Get sandboxes for the authenticated runner tags: - sandbox /sandbox/{sandboxIdOrName}: get: operationId: getSandbox parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: verbose required: false in: query description: Include verbose output schema: type: boolean responses: '200': description: Sandbox details content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Get sandbox details tags: - sandbox delete: operationId: deleteSandbox parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string responses: '200': description: Sandbox has been deleted content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Delete sandbox tags: - sandbox /sandbox/{sandboxIdOrName}/recover: post: operationId: recoverSandbox parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: skipStart required: false in: query description: If true, the sandbox is left in STOPPED after recovery instead of being started. schema: type: boolean responses: '200': description: Recovery initiated content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Recover sandbox from error state tags: - sandbox /sandbox/{sandboxIdOrName}/start: post: operationId: startSandbox parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string responses: '200': description: Sandbox has been started or is being restored from archived state content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Start sandbox tags: - sandbox /sandbox/{sandboxIdOrName}/stop: post: operationId: stopSandbox parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: force required: false in: query description: Force stop the sandbox using SIGKILL instead of SIGTERM schema: type: boolean responses: '200': description: Sandbox has been stopped content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Stop sandbox tags: - sandbox /sandbox/{sandboxIdOrName}/resize: post: operationId: resizeSandbox parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ResizeSandbox' responses: '200': description: Sandbox has been resized content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Resize sandbox resources tags: - sandbox /sandbox/{sandboxIdOrName}/labels: put: operationId: replaceLabels parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SandboxLabels' responses: '200': description: Labels have been successfully replaced content: application/json: schema: $ref: '#/components/schemas/SandboxLabels' security: - bearer: [] - oauth2: - openid - profile - email summary: Replace sandbox labels tags: - sandbox /sandbox/{sandboxId}/state: put: operationId: updateSandboxState parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxId required: true in: path description: ID of the sandbox schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateSandboxStateDto' responses: '200': description: Sandbox state has been successfully updated security: - bearer: [] - oauth2: - openid - profile - email summary: Update sandbox state tags: - sandbox /sandbox/{sandboxIdOrName}/backup: post: operationId: createBackup parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string responses: '200': description: Sandbox backup has been initiated content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Create sandbox backup tags: - sandbox /sandbox/{sandboxIdOrName}/snapshot: post: operationId: createSandboxSnapshot parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateSandboxSnapshot' responses: '200': description: Snapshot creation has been initiated content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Create a snapshot from a sandbox tags: - sandbox /sandbox/{sandboxIdOrName}/fork: post: operationId: forkSandbox parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ForkSandbox' responses: '200': description: Fork operation has been initiated content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Fork a sandbox tags: - sandbox /sandbox/{sandboxIdOrName}/forks: get: operationId: getSandboxForks parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path schema: type: string - name: includeDestroyed required: false in: query schema: type: boolean responses: '200': description: '' content: application/json: schema: type: array items: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Get sandbox fork children tags: - sandbox /sandbox/{sandboxIdOrName}/parent: get: operationId: getSandboxParent parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Get sandbox fork parent tags: - sandbox /sandbox/{sandboxIdOrName}/ancestors: get: operationId: getSandboxAncestors parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: array items: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Get sandbox fork ancestor chain tags: - sandbox /sandbox/{sandboxIdOrName}/public/{isPublic}: post: operationId: updatePublicStatus parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: isPublic required: true in: path description: Public status to set schema: type: boolean responses: '200': description: Public status has been successfully updated content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Update public status tags: - sandbox /sandbox/{sandboxId}/last-activity: post: operationId: updateLastActivity parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxId required: true in: path description: ID of the sandbox schema: type: string responses: '201': description: Last activity has been updated security: - bearer: [] - oauth2: - openid - profile - email summary: Update sandbox last activity tags: - sandbox /sandbox/{sandboxIdOrName}/autostop/{interval}: post: operationId: setAutostopInterval parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: interval required: true in: path description: Auto-stop interval in minutes (0 to disable) schema: type: number responses: '200': description: Auto-stop interval has been set content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Set sandbox auto-stop interval tags: - sandbox /sandbox/{sandboxIdOrName}/autoarchive/{interval}: post: operationId: setAutoArchiveInterval parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: interval required: true in: path description: Auto-archive interval in minutes (0 means the maximum interval will be used) schema: type: number responses: '200': description: Auto-archive interval has been set content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Set sandbox auto-archive interval tags: - sandbox /sandbox/{sandboxIdOrName}/autodelete/{interval}: post: operationId: setAutoDeleteInterval parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: interval required: true in: path description: Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping) schema: type: number responses: '200': description: Auto-delete interval has been set content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Set sandbox auto-delete interval tags: - sandbox /sandbox/{sandboxIdOrName}/network-settings: post: description: Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list). operationId: updateNetworkSettings parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateSandboxNetworkSettings' responses: '200': description: Network settings have been updated content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Update sandbox network settings tags: - sandbox /sandbox/{sandboxIdOrName}/archive: post: operationId: archiveSandbox parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path schema: type: string responses: '200': description: Sandbox has been archived content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Archive sandbox tags: - sandbox /sandbox/{sandboxIdOrName}/ports/{port}/preview-url: get: operationId: getPortPreviewUrl parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: port required: true in: path description: Port number to get preview URL for schema: type: number responses: '200': description: Preview URL for the specified port content: application/json: schema: $ref: '#/components/schemas/PortPreviewUrl' security: - bearer: [] - oauth2: - openid - profile - email summary: Get preview URL for a sandbox port tags: - sandbox /sandbox/{sandboxIdOrName}/ports/{port}/signed-preview-url: get: operationId: getSignedPortPreviewUrl parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: port required: true in: path description: Port number to get signed preview URL for schema: type: integer - name: expiresInSeconds required: false in: query description: 'Expiration time in seconds (default: 60 seconds)' schema: type: integer responses: '200': description: Signed preview URL for the specified port content: application/json: schema: $ref: '#/components/schemas/SignedPortPreviewUrl' security: - bearer: [] - oauth2: - openid - profile - email summary: Get signed preview URL for a sandbox port tags: - sandbox /sandbox/{sandboxIdOrName}/ports/{port}/signed-preview-url/{token}/expire: post: operationId: expireSignedPortPreviewUrl parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: port required: true in: path description: Port number to expire signed preview URL for schema: type: integer - name: token required: true in: path description: Token to expire signed preview URL for schema: type: string responses: '200': description: Signed preview URL has been expired security: - bearer: [] - oauth2: - openid - profile - email summary: Expire signed preview URL for a sandbox port tags: - sandbox /sandbox/{sandboxIdOrName}/build-logs: get: deprecated: true description: This endpoint is deprecated. Use `getBuildLogsUrl` instead. operationId: getBuildLogs parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: follow required: false in: query description: Whether to follow the logs stream schema: type: boolean responses: '200': description: Build logs stream security: - bearer: [] - oauth2: - openid - profile - email summary: Get build logs tags: - sandbox /sandbox/{sandboxIdOrName}/build-logs-url: get: operationId: getBuildLogsUrl parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string responses: '200': description: Build logs URL content: application/json: schema: $ref: '#/components/schemas/Url' security: - bearer: [] - oauth2: - openid - profile - email summary: Get build logs URL tags: - sandbox /sandbox/{sandboxIdOrName}/ssh-access: post: operationId: createSshAccess parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: expiresInMinutes required: false in: query description: 'Expiration time in minutes (default: 60)' schema: type: number responses: '200': description: SSH access has been created content: application/json: schema: $ref: '#/components/schemas/SshAccessDto' security: - bearer: [] - oauth2: - openid - profile - email summary: Create SSH access for sandbox tags: - sandbox delete: operationId: revokeSshAccess parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxIdOrName required: true in: path description: ID or name of the sandbox schema: type: string - name: token required: false in: query description: SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked. schema: type: string responses: '200': description: SSH access has been revoked content: application/json: schema: $ref: '#/components/schemas/Sandbox' security: - bearer: [] - oauth2: - openid - profile - email summary: Revoke SSH access for sandbox tags: - sandbox /sandbox/ssh-access/validate: get: operationId: validateSshAccess parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: token required: true in: query description: SSH access token to validate schema: type: string responses: '200': description: SSH access validation result content: application/json: schema: $ref: '#/components/schemas/SshAccessValidationDto' security: - bearer: [] - oauth2: - openid - profile - email summary: Validate SSH access for sandbox tags: - sandbox /sandbox/{sandboxId}/toolbox-proxy-url: get: operationId: getToolboxProxyUrl parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxId required: true in: path description: ID of the sandbox schema: type: string responses: '200': description: Toolbox proxy URL for the specified sandbox content: application/json: schema: $ref: '#/components/schemas/ToolboxProxyUrl' security: - bearer: [] - oauth2: - openid - profile - email summary: Get toolbox proxy URL for a sandbox tags: - sandbox /sandbox/{sandboxId}/organization: get: operationId: getOrganizationBySandboxId parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxId required: true in: path description: ID of the sandbox schema: type: string responses: '200': description: Organization content: application/json: schema: $ref: '#/components/schemas/Organization' security: - bearer: [] - oauth2: - openid - profile - email summary: Get organization by sandbox ID tags: - sandbox /sandbox/{sandboxId}/region-quota: get: operationId: getRegionQuotaBySandboxId parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxId required: true in: path description: ID of the sandbox schema: type: string responses: '200': description: Region quota content: application/json: schema: $ref: '#/components/schemas/RegionQuota' security: - bearer: [] - oauth2: - openid - profile - email summary: Get region quota by sandbox ID tags: - sandbox /sandbox/{sandboxId}/telemetry/logs: get: description: Retrieve OTEL logs for a sandbox within a time range operationId: getSandboxLogs parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxId required: true in: path description: ID of the sandbox schema: type: string - name: from required: true in: query description: Start of time range (ISO 8601) schema: format: date-time type: string - name: to required: true in: query description: End of time range (ISO 8601) schema: format: date-time type: string - name: page required: false in: query description: Page number (1-indexed) schema: default: 1 type: number - name: limit required: false in: query description: Number of items per page schema: default: 100 type: number - name: severities required: false in: query description: Filter by severity levels (DEBUG, INFO, WARN, ERROR) schema: type: array items: type: string - name: search required: false in: query description: Search in log body schema: type: string responses: '200': description: Paginated list of log entries content: application/json: schema: $ref: '#/components/schemas/PaginatedLogs' security: - bearer: [] - oauth2: - openid - profile - email summary: Get sandbox logs tags: - sandbox /sandbox/{sandboxId}/telemetry/traces: get: description: Retrieve OTEL traces for a sandbox within a time range operationId: getSandboxTraces parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxId required: true in: path description: ID of the sandbox schema: type: string - name: from required: true in: query description: Start of time range (ISO 8601) schema: format: date-time type: string - name: to required: true in: query description: End of time range (ISO 8601) schema: format: date-time type: string - name: page required: false in: query description: Page number (1-indexed) schema: default: 1 type: number - name: limit required: false in: query description: Number of items per page schema: default: 100 type: number responses: '200': description: Paginated list of trace summaries content: application/json: schema: $ref: '#/components/schemas/PaginatedTraces' security: - bearer: [] - oauth2: - openid - profile - email summary: Get sandbox traces tags: - sandbox /sandbox/{sandboxId}/telemetry/traces/{traceId}: get: description: Retrieve all spans for a specific trace operationId: getSandboxTraceSpans parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxId required: true in: path description: ID of the sandbox schema: type: string - name: traceId required: true in: path description: ID of the trace schema: type: string responses: '200': description: List of spans in the trace content: application/json: schema: type: array items: $ref: '#/components/schemas/TraceSpan' security: - bearer: [] - oauth2: - openid - profile - email summary: Get trace spans tags: - sandbox /sandbox/{sandboxId}/telemetry/metrics: get: description: Retrieve OTEL metrics for a sandbox within a time range operationId: getSandboxMetrics parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: sandboxId required: true in: path description: ID of the sandbox schema: type: string - name: from required: true in: query description: Start of time range (ISO 8601) schema: format: date-time type: string - name: to required: true in: query description: End of time range (ISO 8601) schema: format: date-time type: string - name: metricNames required: false in: query description: Filter by metric names schema: type: array items: type: string responses: '200': description: Metrics time series data content: application/json: schema: $ref: '#/components/schemas/MetricsResponse' security: - bearer: [] - oauth2: - openid - profile - email summary: Get sandbox metrics tags: - sandbox components: schemas: SignedPortPreviewUrl: type: object properties: sandboxId: type: string description: ID of the sandbox example: '123456' port: type: integer description: Port number of the signed preview URL example: 3000 token: type: string description: Token of the signed preview URL example: jl6wb9z5o3eii url: type: string description: Signed preview url example: https://{port}-{token}.{proxyDomain} required: - sandboxId - port - token - url OtelConfig: type: object properties: endpoint: type: string description: Endpoint headers: type: object description: Headers example: x-api-key: my-api-key nullable: true additionalProperties: type: string required: - endpoint SandboxLabels: type: object properties: labels: type: object description: Key-value pairs of labels example: environment: dev team: backend additionalProperties: type: string required: - labels UpdateSandboxStateDto: type: object properties: state: type: string description: The new state for the sandbox enum: - creating - restoring - destroyed - destroying - started - stopped - starting - stopping - error - build_failed - pending_build - building_snapshot - unknown - pulling_snapshot - archived - archiving - resizing - snapshotting - forking example: started errorReason: type: string description: Optional error message when reporting an error state example: Failed to pull snapshot image recoverable: type: boolean description: Whether the sandbox is recoverable example: true required: - state PortPreviewUrl: type: object properties: sandboxId: type: string description: ID of the sandbox example: '123456' url: type: string description: Preview url example: https://{port}-{sandboxId}.{proxyDomain} token: type: string description: Access token example: ul67qtv-jl6wb9z5o3eii-ljqt9qed6l required: - sandboxId - url - token PaginatedSandboxes: type: object properties: items: type: array items: $ref: '#/components/schemas/Sandbox' total: type: number page: type: number totalPages: type: number required: - items - total - page - totalPages CreateSandboxSnapshot: type: object properties: name: type: string description: Name for the new snapshot example: my-dev-env-v1 required: - name CreateBuildInfo: type: object properties: dockerfileContent: type: string description: The Dockerfile content used for the build example: 'FROM node:14 WORKDIR /app COPY . . RUN npm install CMD ["npm", "start"]' contextHashes: description: The context hashes used for the build example: - hash1 - hash2 type: array items: type: string required: - dockerfileContent PaginatedLogs: type: object properties: items: description: List of log entries type: array items: $ref: '#/components/schemas/LogEntry' total: type: number description: Total number of log entries matching the query page: type: number description: Current page number totalPages: type: number description: Total number of pages required: - items - total - page - totalPages UpdateSandboxNetworkSettings: type: object properties: networkBlockAll: type: boolean description: Whether to block all network access for the sandbox example: false networkAllowList: type: string description: Comma-separated list of allowed CIDR network addresses for the sandbox example: 192.168.1.0/16,10.0.0.0/24 SandboxDesiredState: type: string enum: - destroyed - started - stopped - resized - archived description: The desired state of the sandbox SandboxState: type: string enum: - creating - restoring - destroyed - destroying - started - stopped - starting - stopping - error - build_failed - pending_build - building_snapshot - unknown - pulling_snapshot - archived - archiving - resizing - snapshotting - forking description: The state of the sandbox SshAccessDto: type: object properties: id: type: string description: Unique identifier for the SSH access example: 123e4567-e89b-12d3-a456-426614174000 sandboxId: type: string description: ID of the sandbox this SSH access is for example: 123e4567-e89b-12d3-a456-426614174000 token: type: string description: SSH access token example: abc123def456ghi789jkl012mno345pqr678stu901vwx234yz expiresAt: format: date-time type: string description: When the SSH access expires example: '2025-01-01T12:00:00.000Z' createdAt: format: date-time type: string description: When the SSH access was created example: '2025-01-01T11:00:00.000Z' updatedAt: format: date-time type: string description: When the SSH access was last updated example: '2025-01-01T11:00:00.000Z' sshCommand: type: string description: SSH command to connect to the sandbox example: ssh -p 2222 token@localhost required: - id - sandboxId - token - expiresAt - createdAt - updatedAt - sshCommand Sandbox: type: object properties: id: type: string description: The ID of the sandbox example: sandbox123 organizationId: type: string description: The organization ID of the sandbox example: organization123 name: type: string description: The name of the sandbox example: MySandbox snapshot: type: string description: The snapshot used for the sandbox example: daytonaio/sandbox:latest user: type: string description: The user associated with the project example: daytona env: type: object description: Environment variables for the sandbox additionalProperties: type: string example: NODE_ENV: production labels: type: object description: Labels for the sandbox additionalProperties: type: string example: daytona.io/public: 'true' public: type: boolean description: Whether the sandbox http preview is public example: false networkBlockAll: type: boolean description: Whether to block all network access for the sandbox example: false networkAllowList: type: string description: Comma-separated list of allowed CIDR network addresses for the sandbox example: 192.168.1.0/16,10.0.0.0/24 target: type: string description: The target environment for the sandbox example: local cpu: type: number description: The CPU quota for the sandbox example: 2 gpu: type: number description: The GPU quota for the sandbox example: 0 memory: type: number description: The memory quota for the sandbox example: 4 disk: type: number description: The disk quota for the sandbox example: 10 state: description: The state of the sandbox example: creating allOf: - $ref: '#/components/schemas/SandboxState' desiredState: description: The desired state of the sandbox example: destroyed allOf: - $ref: '#/components/schemas/SandboxDesiredState' errorReason: type: string description: The error reason of the sandbox example: The sandbox is not running recoverable: type: boolean description: Whether the sandbox error is recoverable. example: true backupState: type: string description: The state of the backup enum: - None - Pending - InProgress - Completed - Error example: None backupCreatedAt: type: string description: The creation timestamp of the last backup example: '2024-10-01T12:00:00Z' autoStopInterval: type: number description: Auto-stop interval in minutes (0 means disabled) example: 30 autoArchiveInterval: type: number description: Auto-archive interval in minutes example: 10080 autoDeleteInterval: type: number description: Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping) example: 30 volumes: description: Array of volumes attached to the sandbox type: array items: $ref: '#/components/schemas/SandboxVolume' buildInfo: description: Build information for the sandbox allOf: - $ref: '#/components/schemas/BuildInfo' createdAt: type: string description: The creation timestamp of the sandbox example: '2024-10-01T12:00:00Z' updatedAt: type: string description: The last update timestamp of the sandbox example: '2024-10-01T12:00:00Z' lastActivityAt: type: string description: The last activity timestamp of the sandbox example: '2024-10-01T12:00:00Z' class: type: string description: The class of the sandbox enum: - small - medium - large example: small deprecated: true daemonVersion: type: string description: The version of the daemon running in the sandbox example: 1.0.0 runnerId: type: string description: The runner ID of the sandbox example: runner123 toolboxProxyUrl: type: string description: The toolbox proxy URL for the sandbox example: https://proxy.app.daytona.io/toolbox required: - id - organizationId - name - user - env - labels - public - networkBlockAll - target - cpu - gpu - memory - disk - toolboxProxyUrl MetricsResponse: type: object properties: series: description: List of metric series type: array items: $ref: '#/components/schemas/MetricSeries' required: - series SandboxVolume: type: object properties: volumeId: type: string description: The ID of the volume example: volume123 mountPath: type: string description: The mount path for the volume example: /data subpath: type: string description: Optional subpath within the volume to mount. When specified, only this S3 prefix will be accessible. When omitted, the entire volume is mounted. example: users/alice required: - volumeId - mountPath BuildInfo: type: object properties: dockerfileContent: type: string description: The Dockerfile content used for the build example: 'FROM node:14 WORKDIR /app COPY . . RUN npm install CMD ["npm", "start"]' contextHashes: description: The context hashes used for the build example: - hash1 - hash2 type: array items: type: string createdAt: format: date-time type: string description: The creation timestamp updatedAt: format: date-time type: string description: The last update timestamp snapshotRef: type: string description: The snapshot reference example: daytonaio/sandbox:latest required: - createdAt - updatedAt - snapshotRef LogEntry: type: object properties: timestamp: type: string description: Timestamp of the log entry body: type: string description: Log message body severityText: type: string description: Severity level text (e.g., INFO, WARN, ERROR) severityNumber: type: number description: Severity level number serviceName: type: string description: Service name that generated the log resourceAttributes: type: object description: Resource attributes from OTEL additionalProperties: type: string logAttributes: type: object description: Log-specific attributes additionalProperties: type: string traceId: type: string description: Associated trace ID if available spanId: type: string description: Associated span ID if available required: - timestamp - body - severityText - serviceName - resourceAttributes - logAttributes MetricDataPoint: type: object properties: timestamp: type: string description: Timestamp of the data point value: type: number description: Value at this timestamp required: - timestamp - value ToolboxProxyUrl: type: object properties: url: type: string description: The toolbox proxy URL for the sandbox example: https://proxy.app.daytona.io/toolbox required: - url TraceSpan: type: object properties: traceId: type: string description: Trace identifier spanId: type: string description: Span identifier parentSpanId: type: string description: Parent span identifier spanName: type: string description: Span name timestamp: type: string description: Span start timestamp durationNs: type: number description: Span duration in nanoseconds spanAttributes: type: object description: Span attributes additionalProperties: type: string statusCode: type: string description: Status code of the span statusMessage: type: string description: Status message required: - traceId - spanId - spanName - timestamp - durationNs - spanAttributes Url: type: object properties: url: type: string description: URL response required: - url ForkSandbox: type: object properties: name: type: string description: The name for the forked sandbox. If not provided, a unique name will be generated. example: my-forked-sandbox TraceSummary: type: object properties: traceId: type: string description: Unique trace identifier rootSpanName: type: string description: Name of the root span startTime: type: string description: Trace start time endTime: type: string description: Trace end time durationMs: type: number description: Total duration in milliseconds spanCount: type: number description: Number of spans in this trace statusCode: type: string description: Status code of the trace required: - traceId - rootSpanName - startTime - endTime - durationMs - spanCount CreateSandbox: type: object properties: name: type: string description: The name of the sandbox. If not provided, the sandbox ID will be used as the name example: MySandbox snapshot: type: string description: The ID or name of the snapshot used for the sandbox example: ubuntu-4vcpu-8ram-100gb user: type: string description: The user associated with the project example: daytona env: type: object description: Environment variables for the sandbox additionalProperties: type: string example: NODE_ENV: production labels: type: object description: Labels for the sandbox additionalProperties: type: string example: daytona.io/public: 'true' public: type: boolean description: Whether the sandbox http preview is publicly accessible example: false networkBlockAll: type: boolean description: Whether to block all network access for the sandbox example: false networkAllowList: type: string description: Comma-separated list of allowed CIDR network addresses for the sandbox example: 192.168.1.0/16,10.0.0.0/24 class: type: string description: The sandbox class type enum: - small - medium - large example: small target: type: string description: The target (region) where the sandbox will be created example: us cpu: type: integer description: CPU cores allocated to the sandbox example: 2 gpu: type: integer description: GPU units allocated to the sandbox example: 1 memory: type: integer description: Memory allocated to the sandbox in GB example: 1 disk: type: integer description: Disk space allocated to the sandbox in GB example: 3 autoStopInterval: type: integer description: Auto-stop interval in minutes (0 means disabled) example: 30 autoArchiveInterval: type: integer description: Auto-archive interval in minutes (0 means the maximum interval will be used) example: 10080 autoDeleteInterval: type: integer description: Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping) example: 30 volumes: description: Array of volumes to attach to the sandbox type: array items: $ref: '#/components/schemas/SandboxVolume' buildInfo: description: Build information for the sandbox allOf: - $ref: '#/components/schemas/CreateBuildInfo' Organization: type: object properties: id: type: string description: Organization ID name: type: string description: Organization name createdBy: type: string description: User ID of the organization creator personal: type: boolean description: Personal organization flag createdAt: format: date-time type: string description: Creation timestamp updatedAt: format: date-time type: string description: Last update timestamp suspended: type: boolean description: Suspended flag suspendedAt: format: date-time type: string description: Suspended at suspensionReason: type: string description: Suspended reason suspendedUntil: format: date-time type: string description: Suspended until suspensionCleanupGracePeriodHours: type: number description: Suspension cleanup grace period hours maxCpuPerSandbox: type: number description: Max CPU per sandbox maxMemoryPerSandbox: type: number description: Max memory per sandbox maxDiskPerSandbox: type: number description: Max disk per sandbox snapshotDeactivationTimeoutMinutes: type: number description: Time in minutes before an unused snapshot is deactivated default: 20160 sandboxLimitedNetworkEgress: type: boolean description: Sandbox default network block all defaultRegionId: type: string description: Default region ID authenticatedRateLimit: type: number description: Authenticated rate limit per minute nullable: true sandboxCreateRateLimit: type: number description: Sandbox create rate limit per minute nullable: true sandboxLifecycleRateLimit: type: number description: Sandbox lifecycle rate limit per minute nullable: true experimentalConfig: type: object description: Experimental configuration otelConfig: description: OpenTelemetry collection configuration nullable: true allOf: - $ref: '#/components/schemas/OtelConfig' authenticatedRateLimitTtlSeconds: type: number description: Authenticated rate limit TTL in seconds nullable: true sandboxCreateRateLimitTtlSeconds: type: number description: Sandbox create rate limit TTL in seconds nullable: true sandboxLifecycleRateLimitTtlSeconds: type: number description: Sandbox lifecycle rate limit TTL in seconds nullable: true required: - id - name - createdBy - personal - createdAt - updatedAt - suspended - suspendedAt - suspensionReason - suspendedUntil - suspensionCleanupGracePeriodHours - maxCpuPerSandbox - maxMemoryPerSandbox - maxDiskPerSandbox - snapshotDeactivationTimeoutMinutes - sandboxLimitedNetworkEgress - authenticatedRateLimit - sandboxCreateRateLimit - sandboxLifecycleRateLimit - experimentalConfig - otelConfig - authenticatedRateLimitTtlSeconds - sandboxCreateRateLimitTtlSeconds - sandboxLifecycleRateLimitTtlSeconds PaginatedTraces: type: object properties: items: description: List of trace summaries type: array items: $ref: '#/components/schemas/TraceSummary' total: type: number description: Total number of traces matching the query page: type: number description: Current page number totalPages: type: number description: Total number of pages required: - items - total - page - totalPages ResizeSandbox: type: object properties: cpu: type: integer description: 'CPU cores to allocate to the sandbox (minimum: 1)' example: 2 minimum: 1 memory: type: integer description: 'Memory in GB to allocate to the sandbox (minimum: 1)' example: 4 minimum: 1 disk: type: integer description: Disk space in GB to allocate to the sandbox (can only be increased) example: 20 minimum: 1 MetricSeries: type: object properties: metricName: type: string description: Name of the metric dataPoints: description: Data points for this metric type: array items: $ref: '#/components/schemas/MetricDataPoint' required: - metricName - dataPoints SshAccessValidationDto: type: object properties: valid: type: boolean description: Whether the SSH access token is valid example: true sandboxId: type: string description: ID of the sandbox this SSH access is for example: 123e4567-e89b-12d3-a456-426614174000 required: - valid - sandboxId RegionQuota: type: object properties: organizationId: type: string regionId: type: string totalCpuQuota: type: number totalMemoryQuota: type: number totalDiskQuota: type: number maxCpuPerSandbox: type: number nullable: true maxMemoryPerSandbox: type: number nullable: true maxDiskPerSandbox: type: number nullable: true maxDiskPerNonEphemeralSandbox: type: number nullable: true required: - organizationId - regionId - totalCpuQuota - totalMemoryQuota - totalDiskQuota - maxCpuPerSandbox - maxMemoryPerSandbox - maxDiskPerSandbox - maxDiskPerNonEphemeralSandbox securitySchemes: bearer: scheme: bearer bearerFormat: JWT type: http description: API Key access oauth2: type: openIdConnect openIdConnectUrl: http://localhost:3000/.well-known/openid-configuration