An instance is a unikernel virtual machine running an application.
List Instances
Get one or many instances with their current status and configuration. It's possible to filter this list by ID(s) (name or UUID).
query Parameters
detailsbooleanWhether to include details about the instance in the response. By default this is set to true, meaning that all information about the instance will be included in the response. If set to false, only the basic information about the instance will be included, such as its name and UUID.
Request Body
uuidstring · uuid · requiredMutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000
namestring · requiredMutually exclusive with UUID.
Example: funky-town-g756b5d
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 432
Create Instance
Create an instance in Unikraft Cloud.
Request Body
imagestring · requiredThe image to use for the instance.
Example: nginx:latest
namestring(Optional). The name of the instance.
If not provided, a random name will be generated. The name must be unique.
Example: funky-town-g756b5dargsstring[](Optional). The arguments to pass to the instance when it starts.
Example: --port=8080 --debugenvobject(Optional). Environment variables to set for the instance.
Example: {"ENV_VAR1":"value1","ENV_VAR2":"value2"}memory_mbinteger · int64(Optional). Memory in MB to allocate for the instance. Default is 128.
Example: 256service_groupobject(Optional). The service group configuration when creating an instance.
When creating an instance, either a previously created (persistent) service group can be referenced (either through its name or UUID), or a new (ephemeral) service group can be created for the instance by specifying the list of services it should expose and optionally the domains it should use. Not used by template instances.
volumesobject[]Volumes to attach to the instance.
This list can contain both existing and new volumes to create as part of the instance creation. Existing volumes can be referenced by their name or UUID. New volumes can be created by specifying a name, size in MiB, and mount point in the instance. The mount point is the directory in the instance where the volume will be mounted.
autostartbooleanWhether the instance should start automatically on creation.
Example: truereplicasinteger · int64Number of replicas for the instance.
Example: 5restart_policystring · enum · enumRestart policy for the instance. This defines how the instance should behave when it stops or crashes.
Enum values:neveralwayson_failurescale_to_zeroobjectScale-to-zero configuration for the instance.
vcpusinteger · int32Number of vCPUs to allocate for the instance.
Example: 1wait_timeout_msinteger · int64Timeout to wait for all new instances to reach running state in milliseconds. If you autostart your new instance, you can wait for it to finish starting with a blocking API call if you specify a wait timeout greater than zero. No wait performed for a value of 0.
Example: 2000featuresstring[]Features to enable for the instance. Features are specific configurations or capabilities that can be enabled for the instance.
Enum values:delete_on_stop
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 875
Delete Instances
Delete the specified instance(s) by ID(s) (name or UUID). After this call the IDs of the instances are no longer valid. If the instances are currently running, they are force-stopped.
Request Body
uuidstring · uuid · requiredMutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000
namestring · requiredMutually exclusive with UUID.
Example: funky-town-g756b5d
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 221
Update Instances
Update (modify) one or more instances by ID(s) (name or UUID). The instances must be in a stopped state for most update operations.
Request Body
propstring · enum · enum · requiredThe property to modify.
Enum values:imageargsenvmemory_mbvcpusscale_to_zerotagsdelete_lockExample: memory_mbopstring · enum · enum · requiredThe operation to perform on the property.
Enum values:setadddelExample: set
idstring(Optional). A client-provided identifier for tracking this operation in the response.
Example: op-1uuidstring · uuidThe UUID of the instance to update. Mutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000namestringThe name of the instance to update. Mutually exclusive with UUID.
Example: funky-town-g756b5dvalueThe value for the update operation. The type depends on the property and operation:
- For "image": string
- For "args": string or array of strings
- For "env": object (for SET/ADD) or string/array of strings (for DEL)
- For "memory_mb": integer
- For "vcpus": integer
- For "scale_to_zero": object with cooldown_time_ms, policy, and stateful fields
- For "tags": array of strings
- For "delete_lock": boolean
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Get Instances Logs
Retrieve the logs of one or more instances by ID(s) (name or UUID).
Request Body
uuidstring · uuidThe UUID of the instance to retrieve logs for. Mutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000namestringThe name of the instance to retrieve logs for. Mutually exclusive with UUID.
Example: funky-town-g756b5doffsetinteger · uint64The byte offset of the log output to receive. A negative sign makes the offset relative to the end of the log.
Example: 450limitinteger · int64The amount of bytes to return at most.
Example: 3000
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 47
Get Instances Metrics
Get the metrics of one or more instances by their ID(s) (name or UUID).
Request Body
uuidstring · uuid · requiredMutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000
namestring · requiredMutually exclusive with UUID.
Example: funky-town-g756b5d
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Start Instances
Start previously stopped instances by ID(s) (name or UUID) or do nothing if the instances are already running.
Request Body
uuidstring · uuid · requiredMutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000
namestring · requiredMutually exclusive with UUID.
Example: funky-town-g756b5d
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 256
Stop Instances
Stop one or more running instance by ID(s) (name or UUID) or do nothing if the instances are already stopped.
Request Body
uuidstring · uuidThe UUID of the instance to stop. Mutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000namestringThe name of the instance to stop. Mutually exclusive with UUID.
Example: funky-town-g756b5dforcebooleanWhether to immediately force stop the instance.
Example: falsedrain_timeout_msinteger · uint64Timeout for draining connections in milliseconds. The instance does not receive new connections in the draining phase. The instance is stopped when the last connection has been closed or the timeout expired. The maximum timeout may vary. Use -1 for the largest possible value.
Note: This endpoint does not block. Use the wait endpoint for the instance to reach the stopped state.
Example: 250
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 23
List template instances
Get one or more template instances by their UUID(s) or name(s).
query Parameters
detailsbooleanWhether to include details about the templates in the response. By default this is set to true, meaning that all information about the templates will be included in the response. If set to false, only the basic information about the templates will be included, such as their name and UUID.
from_uuidstringIf set, the listing starts from (but does not include) the template with the given UUID. This is useful for pagination.
countinteger · uint32The maximum number of template instances to return. This is useful for pagination. If not set, all the template instances matching filters will be returned. When filtering by IDs, this should not be set.
tagsstring[]A list of tags to filter the template instances by.
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Create template instances from Instances
Convert one or more existing instances by their UUID(s) or name(s) into template instances that can be used to create new instances.
The existing instances must be in the stopped state and not have existing
snapshots.
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Delete template instances
Delete the specified template instance(s) by ID(s) (name or UUID). After this call the IDs of the template instances are no longer valid.
Request Body
uuidstring · uuid · requiredMutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000
namestring · requiredMutually exclusive with UUID.
Example: funky-town-g756b5d
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Update template instances
Update (modify) one or more template instances by ID(s) (name or UUID).
Request Body
propstring · enum · enum · requiredThe property to modify.
Enum values:tagsdelete_lockExample: tagsopstring · enum · enum · requiredThe operation to perform on the property.
Enum values:setadddelExample: add
idstring(Optional). A client-provided identifier for tracking this operation in the response.
Example: op-1uuidstring · uuidThe UUID of the template instance to update. Mutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000namestringThe name of the template instance to update. Mutually exclusive with UUID.
Example: funky-town-g756b5dvalueThe value for the update operation. The type depends on the property and operation:
- For "tags": array of strings
- For "delete_lock": boolean
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Get template instance by UUID
Get a single template instance by its UUID.
path Parameters
uuidstring · uuid · requiredThe UUID of the template instance to retrieve.
Example: 123e4567-e89b-12d3-a456-426614174000
query Parameters
detailsbooleanWhether to include details about the templates in the response. By default this is set to true, meaning that all information about the templates will be included in the response. If set to false, only the basic information about the templates will be included, such as their name and UUID.
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Delete template instance by UUID
Delete a specified template instance by its UUID. After this call the UUID of the template instance is no longer valid.
path Parameters
uuidstring · uuid · requiredThe UUID of the template instance to delete.
Example: 123e4567-e89b-12d3-a456-426614174000
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Update template instance by UUID
Update (modify) a template instance by its UUID.
path Parameters
uuidstring · uuid · requiredThe UUID of the template instance to update.
Example: 123e4567-e89b-12d3-a456-426614174000
Request Body
propstring · enum · enum · requiredThe property to modify.
Enum values:tagsdelete_lockExample: tagsopstring · enum · enum · requiredThe operation to perform on the property.
Enum values:setadddelExample: add
idstring(Optional). A client-provided identifier for tracking this operation in the response.
Example: op-1valueThe value for the update operation. The type depends on the property and operation:
- For "tags": array of strings
- For "delete_lock": boolean
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Wait for Instances States
Wait for one or more instances to reach certain states by ID(s) (name or UUID).
If the instances are already in the desired states, the request will return immediately. If the instances are not in the desired state, the request will block until the instances reach the desired state or the timeout is reached. If the timeout is reached, the request will fail with an error. If the timeout is -1, the request will block indefinitely until the instances reach the desired states.
Request Body
uuidstring · uuidThe UUID of the instance to wait for. Mutually exclusive with name.
Example: 123e4567-e89b-12d3-a456-426614174000namestringThe name of the instance to wait for. Mutually exclusive with UUID.
Example: funky-town-g756b5dstatestring · enum · enumThe desired state to wait for. Default is
running.Enum values:stoppedstartingrunningdrainingstoppingtemplatestandbytimeout_msinteger · int64Timeout in milliseconds to wait for the instance to reach the desired state. If the timeout is reached, the request will fail with an error. A value of -1 means to wait indefinitely until the instance reaches the desired state.
Example: 450
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 450
Get Instance by UUID
Get a single instance by its UUID.
path Parameters
uuidstring · uuid · requiredThe UUID of the instance to get.
query Parameters
detailsbooleanWhether to include details about the instance in the response. By default this is set to true, meaning that all information about the instance will be included in the response. If set to false, only the basic information about the instance will be included, such as its name and UUID.
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 432
Delete Instance by UUID
Delete a specified instance by its UUID. After this call the UUID of the instance is no longer valid. If the instance is currently running, it is force-stopped.
path Parameters
uuidstring · uuid · requiredThe UUID of the instance to delete.
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 221
Update Instance by UUID
Update (modify) an instance by its UUID. The instance must be in a stopped state for most update operations.
path Parameters
uuidstring · uuid · requiredThe UUID of the instance to update.
Example: 123e4567-e89b-12d3-a456-426614174000
Request Body
propstring · enum · enum · requiredThe property to modify.
Enum values:imageargsenvmemory_mbvcpusscale_to_zerotagsdelete_lockExample: memory_mbopstring · enum · enum · requiredThe operation to perform on the property.
Enum values:setadddelExample: set
idstring(Optional). A client-provided identifier for tracking this operation in the response.
Example: op-1valueThe value for the update operation. The type depends on the property and operation:
- For "image": string
- For "args": string or array of strings
- For "env": object (for SET/ADD) or string/array of strings (for DEL)
- For "memory_mb": integer
- For "vcpus": integer
- For "scale_to_zero": object with cooldown_time_ms, policy, and stateful fields
- For "tags": array of strings
- For "delete_lock": boolean
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Get Instance Logs by UUID
Retrieve the logs of an instance by its UUID.
path Parameters
uuidstring · uuid · requiredThe UUID of the instance to retrieve logs for.
Example: 123e4567-e89b-12d3-a456-426614174000
Request Body
offsetinteger · uint64The byte offset of the log output to receive. A negative sign makes the offset relative to the end of the log.
Example: 56000limitinteger · int64The amount of bytes to return at most.
Example: 1500
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 47
Get Instance Metrics by UUID
Get the metrics of an instance by its UUID.
path Parameters
uuidstring · uuid · requiredThe UUID of the instance to retrieve metrics for.
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 76
Start Instance by UUID
Start a previously stopped instance by its UUID or do nothing if the instance is already running.
path Parameters
uuidstring · uuid · requiredThe UUID of the instance to start.
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 256
Stop Instance by UUID
Stop a running instance by its UUID or do nothing if the instance is already stopped.
path Parameters
uuidstring · uuid · requiredThe UUID of the instance to stop.
query Parameters
forcebooleanWhether to immediately force stop the instance.
drain_timeout_msinteger · uint64Timeout for draining connections in milliseconds. The instance does not receive new connections in the draining phase. The instance is stopped when the last connection has been closed or the timeout expired. The maximum timeout may vary. Use -1 for the largest possible value.
Note: This endpoint does not block. Use the wait endpoint for the instance to reach the stopped state.
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 23
Wait for Instance State by UUID
Wait for an instance to reach a certain state, by its UUID.
If the instance is already in the desired state, the request will return immediately. If the instance is not in the desired state, the request will block until the instance reaches the desired state or the timeout is reached. If the timeout is reached, the request will fail with an error. If the timeout is -1, the request will block indefinitely until the instance reaches the desired state.
path Parameters
uuidstring · uuid · requiredThe UUID of the instance to wait for.
Example: 123e4567-e89b-12d3-a456-426614174000
Request Body
timeout_msinteger · int64Timeout in milliseconds to wait for the instance to reach the desired state. If the timeout is reached, the request will fail with an error. A value of -1 means to wait indefinitely until the instance reaches the desired state.
Example: 450
Responses
default
statusstring · enum · enumThe status of the response.
Enum values:successerrormessagestringAn optional message providing additional information about the status. This field is useful when the status is not
success.Example: Failed to perform all operationsdataobjectThe response data for this request.
errorsobject[]A list of errors which may have occurred during the request.
op_time_usinteger · uint64The operation time in microseconds. This is the time it took to process the request and generate the response.
Example: 450