OpenAPI Specification
openapi: 3.1.0
info:
title: Orchestrator Control Plane commit_tags vm API
description: ''
license:
name: ''
version: 0.1.0
tags:
- name: vm
paths:
/api/v1/vm/branch/by_commit/{commit_id}:
post:
tags:
- vm
operationId: branch_by_commit
parameters:
- name: commit_id
in: path
description: The commit id to branch off
required: true
schema:
type: string
- name: count
in: query
description: Number of VMs to branch (optional; default 1)
required: false
schema:
type: integer
format: int32
minimum: 0
responses:
'201':
description: Branch VM(s) created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'400':
description: Invalid VM ID
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
security:
- bearer_auth: []
/api/v1/vm/branch/by_ref/{repo_name}/{tag_name}:
post:
tags:
- vm
operationId: branch_by_ref
parameters:
- name: repo_name
in: path
description: The repository name
required: true
schema:
type: string
- name: tag_name
in: path
description: The tag name within the repository
required: true
schema:
type: string
- name: count
in: query
description: Number of VMs to branch (optional; default 1)
required: false
schema:
type: integer
format: int32
minimum: 0
responses:
'201':
description: Branch VM(s) created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'404':
description: Repository or tag not found
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
security:
- bearer_auth: []
/api/v1/vm/branch/by_tag/{tag_name}:
post:
tags:
- vm
operationId: branch_by_tag
parameters:
- name: tag_name
in: path
description: The tag name to branch off
required: true
schema:
type: string
- name: count
in: query
description: Number of VMs to branch (optional; default 1)
required: false
schema:
type: integer
format: int32
minimum: 0
responses:
'201':
description: Branch VM(s) created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'404':
description: Tag not found
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
security:
- bearer_auth: []
/api/v1/vm/branch/by_vm/{vm_id}:
post:
tags:
- vm
operationId: branch_by_vm
parameters:
- name: vm_id
in: path
description: VM to commit and then branch off of
required: true
schema:
type: string
- name: keep_paused
in: query
description: If true, keep VM paused after commit
required: false
schema:
type: boolean
- name: skip_wait_boot
in: query
description: If true, immediately return an error if VM is booting instead of waiting
required: false
schema:
type: boolean
- name: count
in: query
description: Number of VMs to branch (optional; default 1)
required: false
schema:
type: integer
format: int32
minimum: 0
responses:
'201':
description: Branch VM(s) created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'400':
description: Invalid VM ID
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
security:
- bearer_auth: []
/api/v1/vm/from_commit:
post:
tags:
- vm
operationId: restore_from_commit
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FromCommitVmRequest'
required: true
responses:
'201':
description: VM restored from commit successfully
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Cluster not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/new_root:
post:
tags:
- vm
operationId: create_new_root_vm
parameters:
- name: wait_boot
in: query
description: 'If true, wait for the newly-created VM to finish booting before returning. Default: false.'
required: false
schema:
type: boolean
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewRootRequest'
required: true
responses:
'201':
description: VM created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}:
delete:
tags:
- vm
operationId: delete_vm
parameters:
- name: vm_id
in: path
description: VM ID to delete
required: true
schema:
type: string
- name: skip_wait_boot
in: query
description: 'If true, return an error immediately if the VM is still booting. Default: false'
required: false
schema:
type: boolean
responses:
'200':
description: VM deleted successfully
content:
application/json:
schema:
$ref: '#/components/schemas/VmDeleteResponse'
'400':
description: Invalid VM ID
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}/commit:
post:
tags:
- vm
operationId: commit_vm
parameters:
- name: vm_id
in: path
description: VM ID to commit
required: true
schema:
type: string
- name: keep_paused
in: query
description: If true, keep VM paused after commit
required: false
schema:
type: boolean
- name: skip_wait_boot
in: query
description: 'If true, return an error immediately if the VM is still booting. Default: false'
required: false
schema:
type: boolean
requestBody:
description: Optional commit metadata
content:
application/json:
schema:
$ref: '#/components/schemas/VmCommitRequest'
required: true
responses:
'201':
description: VM committed successfully
content:
application/json:
schema:
$ref: '#/components/schemas/VmCommitResponse'
'400':
description: Invalid VM ID
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}/disk:
patch:
tags:
- vm
operationId: resize_vm_disk
parameters:
- name: vm_id
in: path
description: VM ID whose disk to resize
required: true
schema:
type: string
format: uuid
- name: skip_wait_boot
in: query
description: 'If true, return an error immediately if the VM is still booting. Default: false'
required: false
schema:
type: boolean
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VmResizeDiskRequest'
required: true
responses:
'200':
description: VM disk resized successfully
'400':
description: Invalid request (e.g. new size not larger than current)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}/exec:
post:
tags:
- vm
operationId: exec_vm
parameters:
- name: vm_id
in: path
description: VM ID
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VmExecRequest'
required: true
responses:
'200':
description: Command executed successfully
content:
application/json:
schema:
$ref: '#/components/schemas/VmExecResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}/exec/stream:
post:
tags:
- vm
operationId: exec_vm_stream
parameters:
- name: vm_id
in: path
description: VM ID
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VmExecRequest'
required: true
responses:
'200':
description: NDJSON stream of stdout/stderr chunks
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}/exec/stream/attach:
post:
tags:
- vm
operationId: exec_vm_stream_attach
parameters:
- name: vm_id
in: path
description: VM ID
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VmExecStreamAttachRequest'
required: true
responses:
'200':
description: NDJSON stream replaying from cursor
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}/files:
get:
tags:
- vm
operationId: read_file_vm
parameters:
- name: vm_id
in: path
description: VM ID
required: true
schema:
type: string
format: uuid
- name: path
in: query
description: Absolute path of the file to read
required: true
schema:
type: string
responses:
'200':
description: File contents
content:
application/json:
schema:
$ref: '#/components/schemas/VmReadFileResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
put:
tags:
- vm
operationId: write_file_vm
parameters:
- name: vm_id
in: path
description: VM ID
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VmWriteFileRequest'
required: true
responses:
'200':
description: File written successfully
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}/label:
patch:
tags:
- vm
operationId: label_vm
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LabelVmRequest'
required: true
responses:
'200':
description: Labels set successfully
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}/logs:
get:
tags:
- vm
operationId: vm_logs
parameters:
- name: vm_id
in: path
description: VM ID
required: true
schema:
type: string
format: uuid
- name: offset
in: query
description: 'Byte offset into the log file (default: 0)'
required: false
schema:
type: integer
format: int64
minimum: 0
- name: max_entries
in: query
description: Maximum number of log entries to return
required: false
schema:
type: integer
format: int32
minimum: 0
- name: stream
in: query
description: Filter by 'stdout' or 'stderr'
required: false
schema:
type: string
responses:
'200':
description: Exec logs retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/VmExecLogResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}/metadata:
get:
tags:
- vm
operationId: get_vm_metadata
parameters:
- name: vm_id
in: path
description: VM ID
required: true
schema:
type: string
format: uuid
responses:
'200':
description: VM metadata
content:
application/json:
schema:
$ref: '#/components/schemas/VmMetadataResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}/ssh_key:
get:
tags:
- vm
operationId: ssh_key
parameters:
- name: vm_id
in: path
description: Node ID
required: true
schema:
type: string
format: uuid
responses:
'200':
description: List all VMs on node
content:
application/json:
schema:
$ref: '#/components/schemas/VmSshKeyResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}/state:
patch:
tags:
- vm
operationId: update_vm_state
parameters:
- name: vm_id
in: path
description: VM ID
required: true
schema:
type: string
format: uuid
- name: skip_wait_boot
in: query
description: If true, error immediately if the VM is not finished booting. Defaults to false
required: false
schema:
type: boolean
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VmUpdateStateRequest'
required: true
responses:
'200':
description: VM state updated successfully
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_id}/status:
get:
tags:
- vm
operationId: vm_status
parameters:
- name: vm_id
in: path
description: VM ID
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Get status of a specific VM
content:
application/json:
schema:
$ref: '#/components/schemas/VM'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
/api/v1/vm/{vm_or_commit_id}/branch:
post:
tags:
- vm
operationId: branch_vm
parameters:
- name: vm_or_commit_id
in: path
description: Parent VM or commit ID
required: true
schema:
type: string
- name: keep_paused
in: query
description: If true, keep VM paused after commit. Only applicable when branching a VM ID.
required: false
schema:
type: boolean
- name: skip_wait_boot
in: query
description: If true, immediately return an error if VM is booting instead of waiting. Only applicable when branching a VM ID.
required: false
schema:
type: boolean
- name: count
in: query
description: Number of VMs to branch (optional; default 1)
required: false
schema:
type: integer
format: int32
minimum: 0
responses:
'201':
description: Branch VM created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/NewVmsResponse'
'400':
description: Invalid VM ID
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: VM not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- bearer_auth: []
components:
schemas:
VmCommitRequest:
type: object
description: The request body for POST /api/vm/{vm_id}/commit
properties:
commit_id:
type:
- string
- 'null'
format: uuid
description: If provided, chelsea will use the requested commit UUID. Otherwise, it will generate a UUID itself.
description:
type:
- string
- 'null'
description: Optional description for the commit.
name:
type:
- string
- 'null'
description: Optional human-readable name for the commit. Defaults to auto-generated name if not provided.
VmUpdateStateRequest:
type: object
description: Request body for PATCH /api/vm/{vm_id}/state
required:
- state
properties:
state:
$ref: '#/components/schemas/VmUpdateStateEnum'
description: The requested state for the VM
VmExecLogStream:
type: string
description: Streams available for exec logging.
enum:
- stdout
- stderr
VmExecLogResponse:
type: object
description: Response for exec log tail requests.
required:
- entries
- next_offset
- eof
properties:
entries:
type: array
items:
$ref: '#/components/schemas/VmExecLogEntry'
description: Returned log entries.
eof:
type: boolean
description: True when the end of file was reached.
next_offset:
type: integer
format: int64
description: Next byte offset to continue from.
minimum: 0
VmExecLogEntry:
type: object
description: Individual log entry describing emitted stdout/stderr chunk.
required:
- timestamp
- stream
- data_b64
properties:
data_b64:
type: string
description: Base64-encoded bytes from stdout/stderr chunk.
exec_id:
type:
- string
- 'null'
format: uuid
stream:
$ref: '#/components/schemas/VmExecLogStream'
timestamp:
type: string
VM:
type: object
required:
- vm_id
- owner_id
- created_at
- state
properties:
created_at:
type: string
format: date-time
labels:
type:
- object
- 'null'
additionalProperties:
type: string
propertyNames:
type: string
owner_id:
type: string
format: uuid
state:
$ref: '#/components/schemas/VmState'
vm_id:
type: string
# --- truncated at 32 KB (40 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vers/refs/heads/main/openapi/vers-vm-api-openapi.yml