1366 lines
34 KiB
YAML
Generated
1366 lines
34 KiB
YAML
Generated
definitions:
|
|
BuildSnapshotRequestDTO:
|
|
properties:
|
|
context:
|
|
items:
|
|
type: string
|
|
type: array
|
|
dockerfile:
|
|
type: string
|
|
organizationId:
|
|
type: string
|
|
pushToInternalRegistry:
|
|
type: boolean
|
|
registry:
|
|
$ref: '#/definitions/RegistryDTO'
|
|
snapshot:
|
|
description: Snapshot ID and tag or the build's hash
|
|
type: string
|
|
sourceRegistries:
|
|
items:
|
|
$ref: '#/definitions/RegistryDTO'
|
|
type: array
|
|
required:
|
|
- dockerfile
|
|
- organizationId
|
|
type: object
|
|
CreateBackupDTO:
|
|
properties:
|
|
registry:
|
|
$ref: '#/definitions/RegistryDTO'
|
|
snapshot:
|
|
type: string
|
|
required:
|
|
- registry
|
|
- snapshot
|
|
type: object
|
|
CreateSandboxDTO:
|
|
properties:
|
|
authToken:
|
|
type: string
|
|
cpuQuota:
|
|
minimum: 1
|
|
type: integer
|
|
entrypoint:
|
|
items:
|
|
type: string
|
|
type: array
|
|
env:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
fromVolumeId:
|
|
type: string
|
|
gpuQuota:
|
|
minimum: 0
|
|
type: integer
|
|
id:
|
|
type: string
|
|
memoryQuota:
|
|
minimum: 1
|
|
type: integer
|
|
metadata:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
networkAllowList:
|
|
type: string
|
|
networkBlockAll:
|
|
type: boolean
|
|
organizationId:
|
|
description: Nullable for backward compatibility
|
|
type: string
|
|
osUser:
|
|
type: string
|
|
otelEndpoint:
|
|
type: string
|
|
regionId:
|
|
type: string
|
|
registry:
|
|
$ref: '#/definitions/RegistryDTO'
|
|
skipStart:
|
|
type: boolean
|
|
snapshot:
|
|
type: string
|
|
storageQuota:
|
|
minimum: 1
|
|
type: integer
|
|
userId:
|
|
type: string
|
|
volumes:
|
|
items:
|
|
$ref: '#/definitions/dto.VolumeDTO'
|
|
type: array
|
|
required:
|
|
- id
|
|
- osUser
|
|
- snapshot
|
|
- userId
|
|
type: object
|
|
ErrorResponse:
|
|
description: Error response
|
|
properties:
|
|
code:
|
|
example: BAD_REQUEST
|
|
type: string
|
|
message:
|
|
example: Bad request
|
|
type: string
|
|
method:
|
|
example: GET
|
|
type: string
|
|
path:
|
|
example: /api/resource
|
|
type: string
|
|
statusCode:
|
|
example: 400
|
|
type: integer
|
|
timestamp:
|
|
example: '2023-01-01T12:00:00Z'
|
|
type: string
|
|
required:
|
|
- message
|
|
- path
|
|
- statusCode
|
|
- timestamp
|
|
type: object
|
|
InspectSnapshotInRegistryRequest:
|
|
properties:
|
|
registry:
|
|
$ref: '#/definitions/RegistryDTO'
|
|
snapshot:
|
|
example: nginx:latest
|
|
type: string
|
|
required:
|
|
- snapshot
|
|
type: object
|
|
IsRecoverableDTO:
|
|
properties:
|
|
errorReason:
|
|
type: string
|
|
required:
|
|
- errorReason
|
|
type: object
|
|
IsRecoverableResponse:
|
|
properties:
|
|
recoverable:
|
|
type: boolean
|
|
type: object
|
|
PullSnapshotRequestDTO:
|
|
properties:
|
|
destinationRef:
|
|
type: string
|
|
destinationRegistry:
|
|
$ref: '#/definitions/RegistryDTO'
|
|
newTag:
|
|
type: string
|
|
registry:
|
|
$ref: '#/definitions/RegistryDTO'
|
|
snapshot:
|
|
type: string
|
|
required:
|
|
- snapshot
|
|
type: object
|
|
RecoverSandboxDTO:
|
|
properties:
|
|
backupErrorReason:
|
|
type: string
|
|
cpuQuota:
|
|
minimum: 1
|
|
type: integer
|
|
env:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
errorReason:
|
|
type: string
|
|
fromVolumeId:
|
|
type: string
|
|
gpuQuota:
|
|
minimum: 0
|
|
type: integer
|
|
memoryQuota:
|
|
minimum: 1
|
|
type: integer
|
|
networkAllowList:
|
|
type: string
|
|
networkBlockAll:
|
|
type: boolean
|
|
osUser:
|
|
type: string
|
|
snapshot:
|
|
type: string
|
|
storageQuota:
|
|
minimum: 1
|
|
type: integer
|
|
userId:
|
|
type: string
|
|
volumes:
|
|
items:
|
|
$ref: '#/definitions/dto.VolumeDTO'
|
|
type: array
|
|
required:
|
|
- errorReason
|
|
- osUser
|
|
- userId
|
|
type: object
|
|
RegistryDTO:
|
|
properties:
|
|
password:
|
|
type: string
|
|
project:
|
|
type: string
|
|
url:
|
|
type: string
|
|
username:
|
|
type: string
|
|
required:
|
|
- url
|
|
type: object
|
|
ResizeSandboxDTO:
|
|
properties:
|
|
cpu:
|
|
minimum: 1
|
|
type: integer
|
|
disk:
|
|
minimum: 1
|
|
type: integer
|
|
gpu:
|
|
minimum: 0
|
|
type: integer
|
|
memory:
|
|
minimum: 1
|
|
type: integer
|
|
type: object
|
|
RunnerInfoResponseDTO:
|
|
properties:
|
|
appVersion:
|
|
type: string
|
|
metrics:
|
|
$ref: '#/definitions/RunnerMetrics'
|
|
serviceHealth:
|
|
items:
|
|
$ref: '#/definitions/RunnerServiceInfo'
|
|
type: array
|
|
type: object
|
|
RunnerMetrics:
|
|
properties:
|
|
currentAllocatedCpu:
|
|
type: number
|
|
currentAllocatedDiskGiB:
|
|
type: number
|
|
currentAllocatedMemoryGiB:
|
|
type: number
|
|
currentCpuLoadAverage:
|
|
type: number
|
|
currentCpuUsagePercentage:
|
|
type: number
|
|
currentDiskUsagePercentage:
|
|
type: number
|
|
currentMemoryUsagePercentage:
|
|
type: number
|
|
currentSnapshotCount:
|
|
type: integer
|
|
currentStartedSandboxes:
|
|
type: integer
|
|
type: object
|
|
RunnerServiceInfo:
|
|
properties:
|
|
errorReason:
|
|
type: string
|
|
healthy:
|
|
type: boolean
|
|
serviceName:
|
|
type: string
|
|
required:
|
|
- healthy
|
|
- serviceName
|
|
type: object
|
|
SandboxInfoResponse:
|
|
properties:
|
|
backupError:
|
|
type: string
|
|
backupSnapshot:
|
|
type: string
|
|
backupState:
|
|
$ref: '#/definitions/enums.BackupState'
|
|
daemonVersion:
|
|
type: string
|
|
state:
|
|
$ref: '#/definitions/enums.SandboxState'
|
|
type: object
|
|
SnapshotDigestResponse:
|
|
properties:
|
|
hash:
|
|
example: a7be6198544f09a75b26e6376459b47c5b9972e7351d440e092c4faa9ea064ff
|
|
type: string
|
|
sizeGB:
|
|
example: 0.13
|
|
type: number
|
|
type: object
|
|
SnapshotExistsResponse:
|
|
properties:
|
|
exists:
|
|
example: true
|
|
type: boolean
|
|
type: object
|
|
SnapshotInfoResponse:
|
|
properties:
|
|
cmd:
|
|
example:
|
|
- '["nginx"'
|
|
- '"-g"'
|
|
- '"daemon off;"]'
|
|
items:
|
|
type: string
|
|
type: array
|
|
entrypoint:
|
|
example:
|
|
- '["nginx"'
|
|
- '"-g"'
|
|
- '"daemon off;"]'
|
|
items:
|
|
type: string
|
|
type: array
|
|
hash:
|
|
example: a7be6198544f09a75b26e6376459b47c5b9972e7351d440e092c4faa9ea064ff
|
|
type: string
|
|
name:
|
|
example: nginx:latest
|
|
type: string
|
|
sizeGB:
|
|
example: 0.13
|
|
type: number
|
|
type: object
|
|
StartSandboxResponse:
|
|
properties:
|
|
daemonVersion:
|
|
type: string
|
|
type: object
|
|
StopSandboxDTO:
|
|
properties:
|
|
force:
|
|
type: boolean
|
|
type: object
|
|
TagImageRequestDTO:
|
|
properties:
|
|
sourceImage:
|
|
type: string
|
|
targetImage:
|
|
type: string
|
|
required:
|
|
- sourceImage
|
|
- targetImage
|
|
type: object
|
|
UpdateNetworkSettingsDTO:
|
|
properties:
|
|
networkAllowList:
|
|
type: string
|
|
networkBlockAll:
|
|
type: boolean
|
|
networkLimitEgress:
|
|
type: boolean
|
|
type: object
|
|
dto.VolumeDTO:
|
|
properties:
|
|
mountPath:
|
|
type: string
|
|
subpath:
|
|
type: string
|
|
volumeId:
|
|
type: string
|
|
type: object
|
|
enums.BackupState:
|
|
enum:
|
|
- NONE
|
|
- PENDING
|
|
- IN_PROGRESS
|
|
- COMPLETED
|
|
- FAILED
|
|
type: string
|
|
x-enum-varnames:
|
|
- BackupStateNone
|
|
- BackupStatePending
|
|
- BackupStateInProgress
|
|
- BackupStateCompleted
|
|
- BackupStateFailed
|
|
enums.SandboxState:
|
|
enum:
|
|
- creating
|
|
- restoring
|
|
- destroyed
|
|
- destroying
|
|
- started
|
|
- stopped
|
|
- starting
|
|
- stopping
|
|
- resizing
|
|
- error
|
|
- unknown
|
|
- pulling_snapshot
|
|
type: string
|
|
x-enum-varnames:
|
|
- SandboxStateCreating
|
|
- SandboxStateRestoring
|
|
- SandboxStateDestroyed
|
|
- SandboxStateDestroying
|
|
- SandboxStateStarted
|
|
- SandboxStateStopped
|
|
- SandboxStateStarting
|
|
- SandboxStateStopping
|
|
- SandboxStateResizing
|
|
- SandboxStateError
|
|
- SandboxStateUnknown
|
|
- SandboxStatePullingSnapshot
|
|
info:
|
|
contact: {}
|
|
description: Daytona Runner API
|
|
title: Daytona Runner API
|
|
version: v0.0.0-dev
|
|
paths:
|
|
/:
|
|
get:
|
|
description: Health check
|
|
operationId: HealthCheck
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Health check
|
|
/info:
|
|
get:
|
|
description: Runner info with system metrics
|
|
operationId: RunnerInfo
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/RunnerInfoResponseDTO'
|
|
summary: Runner info
|
|
/sandboxes:
|
|
post:
|
|
description: Create a sandbox
|
|
operationId: Create
|
|
parameters:
|
|
- description: Create sandbox
|
|
in: body
|
|
name: sandbox
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/CreateSandboxDTO'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'201':
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/StartSandboxResponse'
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Create a sandbox
|
|
tags:
|
|
- sandbox
|
|
/sandboxes/{sandboxId}:
|
|
get:
|
|
description: Get sandbox info
|
|
operationId: Info
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: Sandbox info
|
|
schema:
|
|
$ref: '#/definitions/SandboxInfoResponse'
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Get sandbox info
|
|
tags:
|
|
- sandbox
|
|
/sandboxes/{sandboxId}/backup:
|
|
post:
|
|
description: Create sandbox backup
|
|
operationId: CreateBackup
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
- description: Create backup
|
|
in: body
|
|
name: sandbox
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/CreateBackupDTO'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'201':
|
|
description: Backup started
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Create sandbox backup
|
|
tags:
|
|
- sandbox
|
|
/sandboxes/{sandboxId}/destroy:
|
|
post:
|
|
description: Destroy sandbox
|
|
operationId: Destroy
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: Sandbox destroyed
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Destroy sandbox
|
|
tags:
|
|
- sandbox
|
|
/sandboxes/{sandboxId}/is-recoverable:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Check if the sandbox's error reason indicates a recoverable error
|
|
operationId: IsRecoverable
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
- description: Error reason to check
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/IsRecoverableDTO'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/IsRecoverableResponse'
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Check if sandbox error is recoverable
|
|
tags:
|
|
- sandbox
|
|
/sandboxes/{sandboxId}/network-settings:
|
|
get:
|
|
description: Get sandbox network settings
|
|
operationId: GetNetworkSettings
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: Network settings
|
|
schema:
|
|
$ref: '#/definitions/UpdateNetworkSettingsDTO'
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Get sandbox network settings
|
|
tags:
|
|
- sandbox
|
|
post:
|
|
description: Update sandbox network settings
|
|
operationId: UpdateNetworkSettings
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
- description: Update network settings
|
|
in: body
|
|
name: sandbox
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/UpdateNetworkSettingsDTO'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: Network settings updated
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Update sandbox network settings
|
|
tags:
|
|
- sandbox
|
|
/sandboxes/{sandboxId}/recover:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Recover sandbox from error state using specified recovery type
|
|
operationId: Recover
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
- description: Recovery parameters
|
|
in: body
|
|
name: recovery
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/RecoverSandboxDTO'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: Sandbox recovered
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Recover sandbox from error state
|
|
tags:
|
|
- sandbox
|
|
/sandboxes/{sandboxId}/resize:
|
|
post:
|
|
description: Resize sandbox
|
|
operationId: Resize
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
- description: Resize sandbox
|
|
in: body
|
|
name: sandbox
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/ResizeSandboxDTO'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: Sandbox resized
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Resize sandbox
|
|
tags:
|
|
- sandbox
|
|
/sandboxes/{sandboxId}/start:
|
|
post:
|
|
description: Start sandbox
|
|
operationId: Start
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
- description: Metadata
|
|
in: body
|
|
name: metadata
|
|
schema:
|
|
type: object
|
|
- description: Auth token
|
|
in: query
|
|
name: token
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: Sandbox started
|
|
schema:
|
|
$ref: '#/definitions/StartSandboxResponse'
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Start sandbox
|
|
tags:
|
|
- sandbox
|
|
/sandboxes/{sandboxId}/stop:
|
|
post:
|
|
description: Stop sandbox
|
|
operationId: Stop
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
- description: Stop sandbox
|
|
in: body
|
|
name: sandbox
|
|
schema:
|
|
$ref: '#/definitions/StopSandboxDTO'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: Sandbox stopped
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Stop sandbox
|
|
tags:
|
|
- sandbox
|
|
/sandboxes/{sandboxId}/toolbox/{path}:
|
|
delete:
|
|
description: Forwards the request to the specified sandbox's container
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
- description: Path to forward
|
|
in: path
|
|
name: path
|
|
required: true
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Proxied response
|
|
schema: {}
|
|
'400':
|
|
description: Bad request
|
|
schema:
|
|
type: string
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
type: string
|
|
'404':
|
|
description: Sandbox container not found
|
|
schema:
|
|
type: string
|
|
'409':
|
|
description: Sandbox container conflict
|
|
schema:
|
|
type: string
|
|
'500':
|
|
description: Internal server error
|
|
schema:
|
|
type: string
|
|
summary: Proxy requests to the sandbox toolbox
|
|
tags:
|
|
- toolbox
|
|
get:
|
|
description: Forwards the request to the specified sandbox's container
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
- description: Path to forward
|
|
in: path
|
|
name: path
|
|
required: true
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Proxied response
|
|
schema: {}
|
|
'400':
|
|
description: Bad request
|
|
schema:
|
|
type: string
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
type: string
|
|
'404':
|
|
description: Sandbox container not found
|
|
schema:
|
|
type: string
|
|
'409':
|
|
description: Sandbox container conflict
|
|
schema:
|
|
type: string
|
|
'500':
|
|
description: Internal server error
|
|
schema:
|
|
type: string
|
|
summary: Proxy requests to the sandbox toolbox
|
|
tags:
|
|
- toolbox
|
|
post:
|
|
description: Forwards the request to the specified sandbox's container
|
|
parameters:
|
|
- description: Sandbox ID
|
|
in: path
|
|
name: sandboxId
|
|
required: true
|
|
type: string
|
|
- description: Path to forward
|
|
in: path
|
|
name: path
|
|
required: true
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Proxied response
|
|
schema: {}
|
|
'400':
|
|
description: Bad request
|
|
schema:
|
|
type: string
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
type: string
|
|
'404':
|
|
description: Sandbox container not found
|
|
schema:
|
|
type: string
|
|
'409':
|
|
description: Sandbox container conflict
|
|
schema:
|
|
type: string
|
|
'500':
|
|
description: Internal server error
|
|
schema:
|
|
type: string
|
|
summary: Proxy requests to the sandbox toolbox
|
|
tags:
|
|
- toolbox
|
|
/snapshots/build:
|
|
post:
|
|
description: Build a snapshot from a Dockerfile and context hashes. The operation
|
|
runs asynchronously and returns 202 immediately.
|
|
operationId: BuildSnapshot
|
|
parameters:
|
|
- description: Build snapshot request
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/BuildSnapshotRequestDTO'
|
|
responses:
|
|
'202':
|
|
description: Snapshot build started
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Build a snapshot
|
|
tags:
|
|
- snapshots
|
|
/snapshots/exists:
|
|
get:
|
|
description: Check if a specified snapshot exists locally
|
|
operationId: SnapshotExists
|
|
parameters:
|
|
- description: Snapshot name and tag
|
|
in: query
|
|
name: snapshot
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/SnapshotExistsResponse'
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Check if a snapshot exists
|
|
tags:
|
|
- snapshots
|
|
/snapshots/info:
|
|
get:
|
|
description: Get information about a specified snapshot including size and entrypoint.
|
|
Returns 422 if the last pull/build operation failed, with the error reason
|
|
in the message.
|
|
operationId: GetSnapshotInfo
|
|
parameters:
|
|
- description: Snapshot name and tag
|
|
in: query
|
|
name: snapshot
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/SnapshotInfoResponse'
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'422':
|
|
description: Unprocessable Entity
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Get snapshot information
|
|
tags:
|
|
- snapshots
|
|
/snapshots/inspect:
|
|
post:
|
|
description: Inspect a specified snapshot in a registry
|
|
operationId: InspectSnapshotInRegistry
|
|
parameters:
|
|
- description: Inspect snapshot in registry request
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/InspectSnapshotInRegistryRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/SnapshotDigestResponse'
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Inspect a snapshot in a registry
|
|
tags:
|
|
- snapshots
|
|
/snapshots/logs:
|
|
get:
|
|
description: Stream build logs
|
|
operationId: GetBuildLogs
|
|
parameters:
|
|
- description: Snapshot ref
|
|
in: query
|
|
name: snapshotRef
|
|
required: true
|
|
type: string
|
|
- description: Whether to follow the log output
|
|
in: query
|
|
name: follow
|
|
type: boolean
|
|
responses:
|
|
'200':
|
|
description: Build logs stream
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Get build logs
|
|
tags:
|
|
- snapshots
|
|
/snapshots/pull:
|
|
post:
|
|
description: Pull a snapshot from a registry and optionally push to another
|
|
registry. The operation runs asynchronously and returns 202 immediately.
|
|
operationId: PullSnapshot
|
|
parameters:
|
|
- description: Pull snapshot
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/PullSnapshotRequestDTO'
|
|
responses:
|
|
'202':
|
|
description: Snapshot pull started
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Pull a snapshot
|
|
tags:
|
|
- snapshots
|
|
/snapshots/remove:
|
|
post:
|
|
description: Remove a specified snapshot from the local system
|
|
operationId: RemoveSnapshot
|
|
parameters:
|
|
- description: Snapshot name and tag
|
|
in: query
|
|
name: snapshot
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
'200':
|
|
description: Snapshot successfully removed
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Remove a snapshot
|
|
tags:
|
|
- snapshots
|
|
/snapshots/tag:
|
|
post:
|
|
deprecated: true
|
|
description: Tag an existing local image with a new target reference
|
|
operationId: TagImage
|
|
parameters:
|
|
- description: Tag image request
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/TagImageRequestDTO'
|
|
responses:
|
|
'200':
|
|
description: Image successfully tagged
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'401':
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'404':
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'409':
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/ErrorResponse'
|
|
summary: Tag an image
|
|
tags:
|
|
- snapshots
|
|
security:
|
|
- Bearer: []
|
|
securityDefinitions:
|
|
Bearer:
|
|
description: Type "Bearer" followed by a space and an API token.
|
|
in: header
|
|
name: Authorization
|
|
type: apiKey
|
|
swagger: '2.0'
|