openapi: 3.1.0 info: title: Daytona admin workspace API description: Daytona Admin API — admin, audit, config, runners, docker-registry, regions, object-storage, jobs operations on the Daytona AI platform. 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: https://app.daytona.io/api description: Daytona Cloud production API tags: - name: workspace paths: /workspace: get: deprecated: true operationId: listWorkspaces_deprecated 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 responses: '200': description: List of all workspacees content: application/json: schema: type: array items: $ref: '#/components/schemas/Workspace' security: - bearer: [] - oauth2: - openid - profile - email summary: '[DEPRECATED] List all workspaces' tags: - workspace post: deprecated: true operationId: createWorkspace_deprecated 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/CreateWorkspace' responses: '200': description: The workspace has been successfully created. content: application/json: schema: $ref: '#/components/schemas/Workspace' security: - bearer: [] - oauth2: - openid - profile - email summary: '[DEPRECATED] Create a new workspace' tags: - workspace /workspace/{workspaceId}: get: deprecated: true operationId: getWorkspace_deprecated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: workspaceId required: true in: path description: ID of the workspace schema: type: string - name: verbose required: false in: query description: Include verbose output schema: type: boolean responses: '200': description: Workspace details content: application/json: schema: $ref: '#/components/schemas/Workspace' security: - bearer: [] - oauth2: - openid - profile - email summary: '[DEPRECATED] Get workspace details' tags: - workspace delete: deprecated: true operationId: deleteWorkspace_deprecated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: workspaceId required: true in: path description: ID of the workspace schema: type: string - name: force required: true in: query schema: type: boolean responses: '200': description: Workspace has been deleted security: - bearer: [] - oauth2: - openid - profile - email summary: '[DEPRECATED] Delete workspace' tags: - workspace /workspace/{workspaceId}/start: post: deprecated: true operationId: startWorkspace_deprecated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: workspaceId required: true in: path description: ID of the workspace schema: type: string responses: '200': description: Workspace has been started security: - bearer: [] - oauth2: - openid - profile - email summary: '[DEPRECATED] Start workspace' tags: - workspace /workspace/{workspaceId}/stop: post: deprecated: true operationId: stopWorkspace_deprecated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: workspaceId required: true in: path description: ID of the workspace schema: type: string responses: '200': description: Workspace has been stopped security: - bearer: [] - oauth2: - openid - profile - email summary: '[DEPRECATED] Stop workspace' tags: - workspace /workspace/{workspaceId}/labels: put: deprecated: true operationId: replaceLabelsWorkspace_deprecated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: workspaceId required: true in: path description: ID of the workspace 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: '[DEPRECATED] Replace workspace labels' tags: - workspace /workspace/{workspaceId}/backup: post: deprecated: true operationId: createBackupWorkspace_deprecated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: workspaceId required: true in: path description: ID of the workspace schema: type: string responses: '200': description: Workspace backup has been initiated content: application/json: schema: $ref: '#/components/schemas/Workspace' security: - bearer: [] - oauth2: - openid - profile - email summary: '[DEPRECATED] Create workspace backup' tags: - workspace /workspace/{workspaceId}/public/{isPublic}: post: deprecated: true operationId: updatePublicStatusWorkspace_deprecated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: workspaceId required: true in: path description: ID of the workspace schema: type: string - name: isPublic required: true in: path description: Public status to set schema: type: boolean responses: '201': description: '' security: - bearer: [] - oauth2: - openid - profile - email summary: '[DEPRECATED] Update public status' tags: - workspace /workspace/{workspaceId}/autostop/{interval}: post: deprecated: true operationId: setAutostopIntervalWorkspace_deprecated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: workspaceId required: true in: path description: ID of the workspace 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 security: - bearer: [] - oauth2: - openid - profile - email summary: '[DEPRECATED] Set workspace auto-stop interval' tags: - workspace /workspace/{workspaceId}/autoarchive/{interval}: post: deprecated: true operationId: setAutoArchiveIntervalWorkspace_deprecated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: workspaceId required: true in: path description: ID of the workspace 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 security: - bearer: [] - oauth2: - openid - profile - email summary: '[DEPRECATED] Set workspace auto-archive interval' tags: - workspace /workspace/{workspaceId}/archive: post: deprecated: true operationId: archiveWorkspace_deprecated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: workspaceId required: true in: path schema: type: string responses: '200': description: Workspace has been archived security: - bearer: [] - oauth2: - openid - profile - email summary: '[DEPRECATED] Archive workspace' tags: - workspace /workspace/{workspaceId}/ports/{port}/preview-url: get: deprecated: true operationId: getPortPreviewUrlWorkspace_deprecated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: workspaceId required: true in: path description: ID of the workspace 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/WorkspacePortPreviewUrl' security: - bearer: [] - oauth2: - openid - profile - email summary: '[DEPRECATED] Get preview URL for a workspace port' tags: - workspace /workspace/{workspaceId}/build-logs: get: deprecated: true operationId: getBuildLogsWorkspace_deprecated parameters: - name: X-Daytona-Organization-ID in: header description: Use with JWT to specify the organization ID required: false schema: type: string - name: workspaceId required: true in: path description: ID of the workspace 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: '[DEPRECATED] Get build logs' tags: - workspace components: schemas: CreateWorkspace: type: object properties: image: type: string description: The image used for the workspace example: daytonaio/workspace:latest user: type: string description: The user associated with the project example: daytona env: type: object description: Environment variables for the workspace additionalProperties: type: string example: NODE_ENV: production labels: type: object description: Labels for the workspace additionalProperties: type: string example: daytona.io/public: 'true' public: type: boolean description: Whether the workspace http preview is publicly accessible example: false class: type: string description: The workspace class type enum: - small - medium - large example: small target: type: string description: The target (region) where the workspace will be created enum: - eu - us - asia example: eu cpu: type: integer description: CPU cores allocated to the workspace example: 2 gpu: type: integer description: GPU units allocated to the workspace example: 1 memory: type: integer description: Memory allocated to the workspace in GB example: 1 disk: type: integer description: Disk space allocated to the workspace 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 volumes: description: Array of volumes to attach to the workspace type: array items: $ref: '#/components/schemas/SandboxVolume' buildInfo: description: Build information for the workspace allOf: - $ref: '#/components/schemas/CreateBuildInfo' Workspace: 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 image: type: string description: The image used for the workspace example: daytonaio/workspace:latest snapshotState: type: string description: The state of the snapshot enum: - None - Pending - InProgress - Completed - Error example: None snapshotCreatedAt: type: string description: The creation timestamp of the last snapshot example: '2024-10-01T12:00:00Z' info: description: Additional information about the sandbox allOf: - $ref: '#/components/schemas/SandboxInfo' required: - id - organizationId - name - user - env - labels - public - networkBlockAll - target - cpu - gpu - memory - disk - toolboxProxyUrl WorkspacePortPreviewUrl: type: object properties: url: type: string description: Preview url example: https://123456-mysandbox.runner.com token: type: string description: Access token example: ul67qtv-jl6wb9z5o3eii-ljqt9qed6l required: - url - token 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 SandboxLabels: type: object properties: labels: type: object description: Key-value pairs of labels example: environment: dev team: backend additionalProperties: type: string required: - labels 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 SandboxDesiredState: type: string enum: - destroyed - started - stopped - resized - archived description: The desired state of the sandbox 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 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 SandboxInfo: type: object properties: created: type: string description: The creation timestamp of the project example: '2023-10-01T12:00:00Z' name: type: string description: 'Deprecated: The name of the sandbox' example: MySandbox deprecated: true default: '' providerMetadata: type: string description: Additional metadata provided by the provider example: '{"key": "value"}' required: - created - name securitySchemes: bearer: scheme: bearer bearerFormat: JWT type: http description: API Key access oauth2: type: openIdConnect openIdConnectUrl: http://localhost:3000/.well-known/openid-configuration