{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/canonical/main/json-schema/canonical-instances-post-schema.json", "title": "InstancesPost", "description": "InstancesPost represents the fields required to launch a new instance for\na specific application", "x-generated": "2026-10-04", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/canonical-instances-api-openapi.yml#/components/schemas/InstancesPost", "type": "object", "properties": { "addons": { "description": "Addons to enable for the instance", "type": "array", "items": { "type": "string" } }, "app_id": { "description": "ID of the application to use. Can be empty if an image ID is specified instead", "type": "string" }, "app_version": { "description": "Version of the application to use. If not specified, the latest version is used.", "type": "integer", "format": "int64" }, "config": { "type": "object", "properties": { "boot_activity": { "description": "BootActivity specifies the Android activity which is started by default", "type": "string" }, "boot_package": { "description": "BootPackage specifies the Android application package name which is started by default", "type": "string" }, "devmode": { "description": "DevMode specifies if development mode has been turned on for the instance", "type": "boolean" }, "disable_watchdog": { "description": "DisableWatchdog defines whether the watchdog is disabled", "type": "boolean" }, "display": { "description": "Display specifies the configuration of the virutal display of the instance", "type": "object", "properties": { "density": { "description": "Density is the piel density of the virtual display", "type": "integer", "format": "int64" }, "fps": { "description": "FPS is the frame rate of the virtual display", "type": "integer", "format": "int64" }, "height": { "description": "Height is the height of the virtual display", "type": "integer", "format": "int64" }, "width": { "description": "Width is the width of the virtual display", "type": "integer", "format": "int64" } } }, "enable_streaming": { "description": "EnableStreaming specifies if streaming should be enabled for the instance or not", "type": "boolean" }, "features": { "description": "Feature flags to enable for the instance.", "type": "string" }, "metrics_server": { "description": "MetricsServer specifies a metrics server the instance will use", "type": "string" }, "platform": { "description": "Platform specifies the Anbox platform the instance is running with", "type": "string" } } }, "image_id": { "description": "ID of the image to use. Can be empty if an application ID is specified instead.", "type": "string" }, "image_version": { "description": "Version of the image to use. If not specified, the latest version is used.", "type": "integer", "format": "int64" }, "name": { "description": "Name of the instance. Will be automatically assigned if not specified. Names\nmust be unique.", "type": "string" }, "no_start": { "description": "Do not start the instance after creation.", "type": "boolean" }, "node": { "description": "Node to start the instance on. If empty node will be automatically selected.", "type": "string" }, "resources": { "description": "Resources specifies the resources allocated for the instance", "type": "object", "properties": { "cpus": { "description": "Number of CPU cores the instance should get assigned.", "type": "integer", "format": "int64" }, "disk_size": { "description": "Disk size the instance should get allocated in bytes", "type": "integer", "format": "int64" }, "gpu-slots": { "description": "Number of GPU slots the instance should get assigned.", "type": "integer", "format": "int64" }, "memory": { "description": "Memory the instance should get assigned in bytes.", "type": "integer", "format": "int64" }, "vpu-slots": { "description": "Number of VPU slots the instance should get assigned", "type": "integer", "format": "int64" } } }, "services": { "description": "Services to enable for the instance", "type": "array", "items": { "$ref": "#/$defs/NetworkServiceSpec" } }, "tags": { "description": "Tags which will be assigned to the instance", "type": "array", "items": { "type": "string" } }, "type": { "$ref": "#/$defs/InstanceType" }, "user_data": { "description": "User data to pass to the instance.", "type": "string" } }, "$defs": { "InstanceType": { "description": "InstanceType describes the type of an instance (container, vm)", "type": "string" }, "NetworkProtocol": { "description": "NetworkProtocol describes a specific network protocol like TCP or UDP a ContainerService can use", "type": "string" }, "NetworkServiceSpec": { "description": "NetworkServiceSpec is used to define the user defined network services that should be opened on a container", "type": "object", "properties": { "expose": { "description": "Expose defines wether the service is exposed on the public endpoint of the node\nor if it is only available on the private endpoint. To expose the service set to\ntrue and to false otherwise.", "type": "boolean" }, "name": { "description": "Name gives the container a hint what the exposed port is being used for. This\nallows further tweaks inside the container to expose the service correctly.\nExampe: ssh", "type": "string" }, "port": { "description": "Port is the port the container provides a service on", "type": "integer", "format": "int64" }, "port_end": { "description": "PortEnd is the end of the port range set for a service. If empty, only a\nsingle port is opened", "type": "integer", "format": "int64" }, "protocols": { "description": "List of network protocols (tcp, udp) the port should be exposed for", "type": "array", "items": { "$ref": "#/$defs/NetworkProtocol" } } } } } }