-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathopenapi.yaml
More file actions
3573 lines (3478 loc) · 108 KB
/
openapi.yaml
File metadata and controls
3573 lines (3478 loc) · 108 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
info:
title: Hypeman API
description: Generic API for managing VM lifecycle using Cloud Hypervisor with OCI-based workloads
version: 0.2.0
servers:
- url: http://localhost:8080
description: Local development server
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
schemas:
ErrorDetail:
type: object
properties:
code:
type: string
description: Lower-level error code providing more specific detail
example: invalid_input
message:
type: string
description: Further detail about the error
example: Image not found
Error:
type: object
required: [code, message]
properties:
code:
type: string
description: Application-specific error code (machine-readable)
example: bad_request
message:
type: string
description: Human-readable error description for debugging
example: "Missing required field: image"
details:
type: array
description: Additional error details (for multiple errors)
items:
$ref: "#/components/schemas/ErrorDetail"
inner_error:
$ref: "#/components/schemas/ErrorDetail"
InstanceState:
type: string
enum: [Created, Initializing, Running, Paused, Shutdown, Stopped, Standby, Unknown]
description: |
Instance state:
- Created: VMM created but not started (Cloud Hypervisor native)
- Initializing: VM is running while guest init is still in progress
- Running: Guest program has started and instance is ready
- Paused: VM is paused (Cloud Hypervisor native)
- Shutdown: VM shut down but VMM exists (Cloud Hypervisor native)
- Stopped: No VMM running, no snapshot exists
- Standby: No VMM running, snapshot exists (can be restored)
- Unknown: Failed to determine state (see state_error for details)
VolumeMount:
type: object
required: [volume_id, mount_path]
properties:
volume_id:
type: string
description: Volume identifier
example: vol-abc123
mount_path:
type: string
description: Path where volume is mounted in the guest
example: /mnt/data
readonly:
type: boolean
description: Whether volume is mounted read-only
default: false
overlay:
type: boolean
description: Create per-instance overlay for writes (requires readonly=true)
default: false
overlay_size:
type: string
description: Max overlay size as human-readable string (e.g., "1GB"). Required if overlay=true.
example: "1GB"
PortMapping:
type: object
required: [host_port, guest_port]
properties:
host_port:
type: integer
description: Port on the host
example: 8080
guest_port:
type: integer
description: Port in the guest VM
example: 80
protocol:
type: string
enum: [tcp, udp]
default: tcp
Tags:
type: object
maxProperties: 50
description: User-defined key-value tags.
propertyNames:
type: string
minLength: 1
maxLength: 128
pattern: ^[A-Za-z0-9 _.:/=+@-]+$
additionalProperties:
type: string
minLength: 0
maxLength: 256
pattern: ^[A-Za-z0-9 _.:/=+@-]*$
example:
team: backend
env: staging
CreateInstanceRequestNetworkEgressEnforcement:
type: object
description: Egress enforcement policy applied when mediation is enabled.
properties:
mode:
type: string
enum: [all, http_https_only]
default: all
description: |
`all` (default) rejects direct non-mediated TCP egress from the VM,
while `http_https_only` rejects direct egress only on TCP ports 80 and 443.
example: all
CreateInstanceRequestNetworkEgress:
type: object
description: |
Host-mediated outbound network policy.
Omit this object, or set `enabled: false`, to preserve normal direct outbound networking
when `network.enabled` is true.
properties:
enabled:
type: boolean
description: |
Whether to enable the mediated egress path.
When false or omitted, the instance keeps normal direct outbound networking and
host-managed credential rewriting is disabled.
default: false
example: true
enforcement:
$ref: "#/components/schemas/CreateInstanceRequestNetworkEgressEnforcement"
CreateInstanceRequestCredentialSource:
type: object
required: [env]
properties:
env:
type: string
description: |
Name of the real credential in the request `env` map.
The guest-visible env var key can receive a mock placeholder, while the mediated
egress path resolves that placeholder back to this real value only on the host.
example: OUTBOUND_OPENAI_KEY
CreateInstanceRequestCredentialInjectAs:
type: object
required: [header, format]
description: |
Current v1 transform shape. Header templating is supported now; other transform
types (for example request signing) can be added in future revisions.
properties:
header:
type: string
description: Header name to set/mutate for matching outbound requests.
example: Authorization
format:
type: string
description: Template that must include `${value}`.
example: "Bearer ${value}"
CreateInstanceRequestCredentialInject:
type: object
required: [as]
properties:
hosts:
type: array
items:
type: string
description: |
Optional destination host patterns (`api.example.com`, `*.example.com`).
Omit to allow injection on all destinations.
example: [api.openai.com, "*.openai.com"]
as:
$ref: "#/components/schemas/CreateInstanceRequestCredentialInjectAs"
CreateInstanceRequestCredential:
type: object
required: [source, inject]
properties:
source:
$ref: "#/components/schemas/CreateInstanceRequestCredentialSource"
inject:
type: array
items:
$ref: "#/components/schemas/CreateInstanceRequestCredentialInject"
minItems: 1
UpdateInstanceRequest:
type: object
properties:
env:
type: object
minProperties: 1
additionalProperties:
type: string
description: |
Environment variables to update (merged with existing).
Only keys referenced by the instance's existing credential `source.env` bindings
are accepted. Use this to rotate real credential values without restarting the VM.
example:
OUTBOUND_OPENAI_KEY: new-rotated-key-456
CreateInstanceRequest:
type: object
required: [name, image]
properties:
name:
type: string
description: Human-readable name (lowercase letters, digits, and dashes only; cannot start or end with a dash)
pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
maxLength: 63
example: my-workload-1
image:
type: string
description: OCI image reference
example: docker.io/library/alpine:latest
size:
type: string
description: Base memory size (human-readable format like "1GB", "512MB", "2G")
default: "1GB"
example: "2GB"
hotplug_size:
type: string
description: Additional memory for hotplug (human-readable format like "3GB", "1G"). Omit to disable hotplug memory.
example: "2GB"
overlay_size:
type: string
description: Writable overlay disk size (human-readable format like "10GB", "50G")
default: "10GB"
example: "20GB"
disk_io_bps:
type: string
description: Disk I/O rate limit (e.g., "100MB/s", "500MB/s"). Defaults to proportional share based on CPU allocation if configured.
example: "100MB/s"
vcpus:
type: integer
description: Number of virtual CPUs
default: 2
example: 2
env:
type: object
additionalProperties:
type: string
description: Environment variables
example:
PORT: "3000"
NODE_ENV: production
credentials:
type: object
description: |
Host-managed credential brokering policies keyed by guest-visible env var name.
Those guest env vars receive mock placeholder values, while the real values remain
host-scoped in the request `env` map and are only materialized on the mediated
egress path according to each credential's `source` and `inject` rules.
additionalProperties:
$ref: "#/components/schemas/CreateInstanceRequestCredential"
example:
OUTBOUND_OPENAI_KEY:
source:
env: OUTBOUND_OPENAI_KEY
inject:
- hosts: [api.openai.com, "*.openai.com"]
as:
header: Authorization
format: "Bearer ${value}"
tags:
$ref: "#/components/schemas/Tags"
network:
type: object
description: Network configuration for the instance
properties:
enabled:
type: boolean
description: Whether to attach instance to the default network
default: true
example: true
bandwidth_download:
type: string
description: Download bandwidth limit (external→VM, e.g., "1Gbps", "125MB/s"). Defaults to proportional share based on CPU allocation.
example: "1Gbps"
bandwidth_upload:
type: string
description: Upload bandwidth limit (VM→external, e.g., "1Gbps", "125MB/s"). Defaults to proportional share based on CPU allocation.
example: "1Gbps"
egress:
$ref: "#/components/schemas/CreateInstanceRequestNetworkEgress"
devices:
type: array
items:
type: string
description: Device IDs or names to attach for GPU/PCI passthrough
example: ["l4-gpu"]
gpu:
$ref: "#/components/schemas/GPUConfig"
volumes:
type: array
description: Volumes to attach to the instance at creation time
items:
$ref: "#/components/schemas/VolumeMount"
hypervisor:
type: string
enum: [cloud-hypervisor, firecracker, qemu, vz]
description: Hypervisor to use for this instance. Defaults to server configuration.
example: cloud-hypervisor
snapshot_policy:
description: Snapshot compression policy for this instance. Controls compression settings applied when creating snapshots or entering standby.
$ref: "#/components/schemas/SnapshotPolicy"
skip_kernel_headers:
type: boolean
description: |
Skip kernel headers installation during boot for faster startup.
When true, DKMS (Dynamic Kernel Module Support) will not work,
preventing compilation of out-of-tree kernel modules (e.g., NVIDIA vGPU drivers).
Recommended for workloads that don't need kernel module compilation.
default: false
example: true
skip_guest_agent:
type: boolean
description: |
Skip guest-agent installation during boot.
When true, the exec and stat APIs will not work for this instance.
The instance will still run, but remote command execution will be unavailable.
default: false
example: false
entrypoint:
type: array
items:
type: string
description: Override image entrypoint (like docker run --entrypoint). Omit to use image default.
example: ["/bin/sh", "-c"]
cmd:
type: array
items:
type: string
description: Override image CMD (like docker run <image> <command>). Omit to use image default.
example: ["echo", "hello"]
# Future: port_mappings, timeout_seconds
ForkInstanceRequest:
type: object
required: [name]
properties:
name:
type: string
description: Name for the forked instance (lowercase letters, digits, and dashes only; cannot start or end with a dash)
pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
maxLength: 63
example: my-workload-1-fork
from_running:
type: boolean
description: |
Allow forking from a running source instance.
When true and source is Running, the source is put into standby, forked, then restored back to Running.
default: false
example: false
target_state:
$ref: "#/components/schemas/ForkTargetState"
description: |
Optional final state for the forked instance.
Default is the source instance state at fork time.
For example, forking from Running defaults the fork result to Running.
ForkTargetState:
type: string
description: Target state for the forked instance after fork completes
enum: [Stopped, Standby, Running]
example: Running
SnapshotKind:
type: string
description: Snapshot capture kind
enum: [Standby, Stopped]
example: Standby
SnapshotTargetState:
type: string
description: Target state when restoring or forking from a snapshot
enum: [Stopped, Standby, Running]
example: Running
Snapshot:
type: object
required: [id, kind, source_instance_id, source_instance_name, source_hypervisor, created_at, size_bytes]
properties:
id:
type: string
description: Auto-generated unique snapshot identifier
example: q7z1w7l2af4l8y7q1h7g2m3s
name:
type: string
description: Optional human-readable snapshot name (unique per source instance)
nullable: true
example: baseline-standby
kind:
$ref: "#/components/schemas/SnapshotKind"
tags:
$ref: "#/components/schemas/Tags"
source_instance_id:
type: string
description: Source instance ID at snapshot creation time
example: qilviffnqzck2jrim1x6s2b1
source_instance_name:
type: string
description: Source instance name at snapshot creation time
example: nginx1
source_hypervisor:
type: string
enum: [cloud-hypervisor, firecracker, qemu, vz]
description: Source instance hypervisor at snapshot creation time
example: cloud-hypervisor
created_at:
type: string
format: date-time
description: Snapshot creation timestamp
example: "2026-03-06T13:56:11Z"
size_bytes:
type: integer
format: int64
description: Total payload size in bytes
example: 104857600
compression_state:
type: string
enum: [none, compressing, compressed, error]
description: Compression status of the snapshot payload memory file
example: compressed
compression_error:
type: string
description: Compression error message when compression_state is error
nullable: true
example: "write compressed stream: no space left on device"
compression:
$ref: "#/components/schemas/SnapshotCompressionConfig"
compressed_size_bytes:
type: integer
format: int64
nullable: true
description: Compressed memory payload size in bytes
example: 73400320
uncompressed_size_bytes:
type: integer
format: int64
nullable: true
description: Uncompressed memory payload size in bytes
example: 4294967296
SnapshotCompressionConfig:
type: object
required: [enabled]
properties:
enabled:
type: boolean
description: Enable snapshot memory compression
example: true
algorithm:
type: string
enum: [zstd, lz4]
description: Compression algorithm (defaults to zstd when enabled). Ignored when enabled is false.
example: zstd
level:
type: integer
minimum: 0
maximum: 19
description: Compression level. Allowed ranges are zstd=1-19 and lz4=0-9. When omitted, zstd defaults to 1 and lz4 defaults to 0. Ignored when enabled is false.
example: 1
SnapshotPolicy:
type: object
properties:
compression:
$ref: "#/components/schemas/SnapshotCompressionConfig"
CreateSnapshotRequest:
type: object
required: [kind]
properties:
kind:
$ref: "#/components/schemas/SnapshotKind"
name:
type: string
description: Optional snapshot name (lowercase letters, digits, and dashes only; cannot start or end with a dash)
pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
maxLength: 63
example: pre-upgrade
tags:
$ref: "#/components/schemas/Tags"
compression:
description: Compression settings to use for this snapshot. Overrides instance and server defaults.
$ref: "#/components/schemas/SnapshotCompressionConfig"
StandbyInstanceRequest:
type: object
properties:
compression:
$ref: "#/components/schemas/SnapshotCompressionConfig"
RestoreSnapshotRequest:
type: object
properties:
target_state:
$ref: "#/components/schemas/SnapshotTargetState"
description: |
Optional final state after restore.
Defaults by snapshot kind:
- Standby snapshot defaults to Running
- Stopped snapshot defaults to Stopped
target_hypervisor:
type: string
enum: [cloud-hypervisor, firecracker, qemu, vz]
description: |
Optional hypervisor override. Allowed only when restoring from a Stopped snapshot.
Standby snapshots must restore with their original hypervisor.
example: qemu
ForkSnapshotRequest:
type: object
required: [name]
properties:
name:
type: string
description: Name for the new instance (lowercase letters, digits, and dashes only; cannot start or end with a dash)
pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
maxLength: 63
example: nginx-from-snap
target_state:
$ref: "#/components/schemas/SnapshotTargetState"
description: |
Optional final state for the forked instance.
Defaults by snapshot kind:
- Standby snapshot defaults to Running
- Stopped snapshot defaults to Stopped
target_hypervisor:
type: string
enum: [cloud-hypervisor, firecracker, qemu, vz]
description: |
Optional hypervisor override. Allowed only when forking from a Stopped snapshot.
Standby snapshots must fork with their original hypervisor.
example: cloud-hypervisor
Instance:
type: object
required: [id, name, image, state, created_at]
properties:
id:
type: string
description: Auto-generated unique identifier (CUID2 format)
example: tz4a98xxat96iws9zmbrgj3a
name:
type: string
description: Human-readable name
example: my-workload-1
image:
type: string
description: OCI image reference
example: docker.io/library/alpine:latest
state:
$ref: "#/components/schemas/InstanceState"
state_error:
type: string
description: Error message if state couldn't be determined (only set when state is Unknown)
nullable: true
example: "failed to query VMM: connection refused"
size:
type: string
description: Base memory size (human-readable)
example: "2GB"
hotplug_size:
type: string
description: Hotplug memory size (human-readable)
example: "2GB"
overlay_size:
type: string
description: Writable overlay disk size (human-readable)
example: "10GB"
vcpus:
type: integer
description: Number of virtual CPUs
example: 2
disk_io_bps:
type: string
description: Disk I/O rate limit (human-readable, e.g., "100MB/s")
example: "100MB/s"
env:
type: object
additionalProperties:
type: string
description: Environment variables
tags:
$ref: "#/components/schemas/Tags"
network:
type: object
description: Network configuration of the instance
properties:
enabled:
type: boolean
description: Whether instance is attached to the default network
example: true
name:
type: string
description: Network name (always "default" when enabled)
example: "default"
ip:
type: string
description: Assigned IP address (null if no network)
example: "192.168.100.10"
nullable: true
mac:
type: string
description: Assigned MAC address (null if no network)
example: "02:00:00:ab:cd:ef"
nullable: true
bandwidth_download:
type: string
description: Download bandwidth limit (human-readable, e.g., "1Gbps", "125MB/s")
example: "125MB/s"
bandwidth_upload:
type: string
description: Upload bandwidth limit (human-readable, e.g., "1Gbps", "125MB/s")
example: "125MB/s"
volumes:
type: array
description: Volumes attached to the instance
items:
$ref: "#/components/schemas/VolumeMount"
gpu:
$ref: "#/components/schemas/InstanceGPU"
created_at:
type: string
format: date-time
description: Creation timestamp (RFC3339)
example: "2025-01-15T10:30:00Z"
started_at:
type: string
format: date-time
description: Start timestamp (RFC3339)
example: "2025-01-15T10:30:05Z"
nullable: true
stopped_at:
type: string
format: date-time
description: Stop timestamp (RFC3339)
example: "2025-01-15T12:30:00Z"
nullable: true
exit_code:
type: integer
description: App exit code (null if VM hasn't exited)
nullable: true
example: 137
exit_message:
type: string
description: Human-readable description of exit (e.g., "command not found", "killed by signal 9 (SIGKILL) - OOM")
example: "killed by signal 9 (SIGKILL)"
has_snapshot:
type: boolean
description: Whether a snapshot exists for this instance
example: false
hypervisor:
type: string
enum: [cloud-hypervisor, firecracker, qemu, vz]
description: Hypervisor running this instance
example: cloud-hypervisor
snapshot_policy:
$ref: "#/components/schemas/SnapshotPolicy"
PathInfo:
type: object
required: [exists]
properties:
exists:
type: boolean
description: Whether the path exists
example: true
is_dir:
type: boolean
description: True if this is a directory
example: false
is_file:
type: boolean
description: True if this is a regular file
example: true
is_symlink:
type: boolean
description: True if this is a symbolic link (only set when follow_links=false)
example: false
link_target:
type: string
description: Symlink target path (only set when is_symlink=true)
nullable: true
example: "/actual/target/path"
mode:
type: integer
description: File mode (Unix permissions)
example: 420
size:
type: integer
format: int64
description: File size in bytes
example: 1024
error:
type: string
description: Error message if stat failed (e.g., permission denied). Only set when exists is false due to an error rather than the path not existing.
nullable: true
example: "permission denied"
InstanceStats:
type: object
required: [instance_id, instance_name, cpu_seconds, memory_rss_bytes, memory_vms_bytes, network_rx_bytes, network_tx_bytes, allocated_vcpus, allocated_memory_bytes]
description: Real-time resource utilization statistics for a VM instance
properties:
instance_id:
type: string
description: Instance identifier
example: "qilviffnqzck2jrim1x6s2b1"
instance_name:
type: string
description: Instance name
example: "my-web-server"
cpu_seconds:
type: number
format: double
description: Total CPU time consumed by the VM hypervisor process in seconds
example: 29.94
memory_rss_bytes:
type: integer
format: int64
description: Resident Set Size - actual physical memory used by the VM in bytes
example: 443338752
memory_vms_bytes:
type: integer
format: int64
description: Virtual Memory Size - total virtual memory allocated in bytes
example: 4330745856
network_rx_bytes:
type: integer
format: int64
description: Total network bytes received by the VM (from TAP interface)
example: 12345678
network_tx_bytes:
type: integer
format: int64
description: Total network bytes transmitted by the VM (from TAP interface)
example: 87654321
allocated_vcpus:
type: integer
description: Number of vCPUs allocated to the VM
example: 2
allocated_memory_bytes:
type: integer
format: int64
description: Total memory allocated to the VM (Size + HotplugSize) in bytes
example: 4294967296
memory_utilization_ratio:
type: number
format: double
description: Memory utilization ratio (RSS / allocated memory). Only present when allocated_memory_bytes > 0.
nullable: true
example: 0.103
CreateImageRequest:
type: object
required: [name]
properties:
name:
type: string
description: OCI image reference (e.g., docker.io/library/nginx:latest)
example: docker.io/library/nginx:latest
tags:
$ref: "#/components/schemas/Tags"
Image:
type: object
required: [name, digest, status, created_at]
properties:
name:
type: string
description: Normalized OCI image reference (tag or digest)
example: docker.io/library/nginx:latest
digest:
type: string
description: Resolved manifest digest
example: sha256:abc123def456...
status:
type: string
enum: [pending, pulling, converting, ready, failed]
description: Build status
example: ready
queue_position:
type: integer
description: Position in build queue (null if not queued)
example: 2
nullable: true
error:
type: string
description: Error message if status is failed
example: "pull failed: connection timeout"
nullable: true
size_bytes:
type: integer
format: int64
description: Disk size in bytes (null until ready)
example: 536870912
nullable: true
entrypoint:
type: array
items:
type: string
description: Entrypoint from container metadata
example: ["/docker-entrypoint.sh"]
nullable: true
cmd:
type: array
items:
type: string
description: CMD from container metadata
example: ["nginx", "-g", "daemon off;"]
nullable: true
env:
type: object
additionalProperties:
type: string
description: Environment variables from container metadata
example:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
tags:
$ref: "#/components/schemas/Tags"
working_dir:
type: string
description: Working directory from container metadata
example: /app
nullable: true
created_at:
type: string
format: date-time
description: Creation timestamp (RFC3339)
example: "2025-01-15T10:00:00Z"
CreateVolumeRequest:
type: object
required: [name, size_gb]
properties:
id:
type: string
description: Optional custom identifier (auto-generated if not provided)
example: vol-data-1
name:
type: string
description: Volume name
example: my-data-volume
size_gb:
type: integer
description: Size in gigabytes
example: 10
tags:
$ref: "#/components/schemas/Tags"
VolumeAttachment:
type: object
required: [instance_id, mount_path, readonly]
properties:
instance_id:
type: string
description: ID of the instance this volume is attached to
example: inst-abc123
mount_path:
type: string
description: Mount path in the guest
example: /mnt/data
readonly:
type: boolean
description: Whether the attachment is read-only
example: false
Volume:
type: object
required: [id, name, size_gb, created_at]
properties:
id:
type: string
description: Unique identifier
example: vol-data-1
name:
type: string
description: Volume name
example: my-data-volume
size_gb:
type: integer
description: Size in gigabytes
example: 10
tags:
$ref: "#/components/schemas/Tags"
attachments:
type: array
description: List of current attachments (empty if not attached)
items:
$ref: "#/components/schemas/VolumeAttachment"
created_at:
type: string
format: date-time
description: Creation timestamp (RFC3339)
example: "2025-01-15T09:00:00Z"
AttachVolumeRequest:
type: object
required: [mount_path]
properties:
mount_path:
type: string
description: Path where volume should be mounted
example: /mnt/data
readonly:
type: boolean
description: Mount as read-only
default: false
Health:
type: object
required: [status]
properties:
status:
type: string
enum: [ok]
example: ok
IngressMatch:
type: object
required: [hostname]
properties:
hostname:
type: string
description: |
Hostname to match. Can be:
- Literal: "api.example.com" (exact match on Host header)
- Pattern: "{instance}.example.com" (dynamic routing based on subdomain)
Pattern hostnames use named captures in curly braces (e.g., {instance}, {app})
that extract parts of the hostname for routing. The extracted values can be
referenced in the target.instance field.
example: "{instance}.example.com"
port:
type: integer
description: Host port to listen on for this rule (default 80)
default: 80
example: 8080
IngressTarget:
type: object
required: [instance, port]
properties:
instance:
type: string
description: |
Target instance name, ID, or capture reference.
- For literal hostnames: Use the instance name or ID directly (e.g., "my-api")
- For pattern hostnames: Reference a capture from the hostname (e.g., "{instance}")
When using pattern hostnames, the instance is resolved dynamically at request time.
example: "{instance}"
port:
type: integer
description: Target port on the instance
example: 8080
IngressRule:
type: object
required: [match, target]
properties:
match:
$ref: "#/components/schemas/IngressMatch"
target:
$ref: "#/components/schemas/IngressTarget"
tls:
type: boolean
description: Enable TLS termination (certificate auto-issued via ACME).
default: false
redirect_http:
type: boolean
description: Auto-create HTTP to HTTPS redirect for this hostname (only applies when tls is enabled)
default: false
CreateIngressRequest:
type: object
required: [name, rules]
properties: