Skip to main content

Create Vm

POST /v1/vms

Authentication

Requires authentication via: OAuth2PasswordBearer.

Parameters

NameInTypeRequiredDescriptionConstraints
waitquerybooleanNoWait for VM to be provisioneddefault=true
X-API-Keyheaderstring | nullNonullable

Request Body

Required: Yes

application/json

Resolved schema:

{
"properties": {
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id"
},
"vm_lifetime_seconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Vm Lifetime Seconds"
},
"memory_mb": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Memory Mb"
},
"vcpu_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Vcpu Count"
},
"metadata": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"title": "Metadata"
},
"env": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"title": "Env"
},
"egress_policy": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"title": "Egress Policy"
},
"snapshot_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Snapshot Id"
},
"snapshot_on_terminate": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Snapshot On Terminate"
},
"snapshot_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Snapshot Name"
},
"share": {
"anyOf": [
{
"properties": {
"port": {
"type": "integer",
"maximum": 65535,
"minimum": 1,
"title": "Port"
},
"is_public": {
"type": "boolean",
"title": "Is Public",
"default": false
}
},
"type": "object",
"required": [
"port"
],
"title": "ShareRequest"
},
{
"type": "null"
}
]
},
"custom_domain": {
"anyOf": [
{
"properties": {
"domain": {
"type": "string",
"title": "Domain"
},
"dns_provider": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Dns Provider"
},
"dns_credentials": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"title": "Dns Credentials"
}
},
"type": "object",
"required": [
"domain"
],
"title": "CustomDomainRequest"
},
{
"type": "null"
}
]
},
"image_variant": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Image Variant"
},
"volumes": {
"anyOf": [
{
"items": {
"properties": {
"volume_id": {
"type": "string",
"title": "Volume Id"
},
"mount_path": {
"type": "string",
"title": "Mount Path"
},
"mode": {
"type": "string",
"title": "Mode",
"default": "rw"
},
"checkpoint_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Checkpoint Id"
}
},
"type": "object",
"required": [
"volume_id",
"mount_path"
],
"title": "VMVolumeMountRequest"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Volumes"
},
"vault_ids": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Vault Ids"
}
},
"type": "object",
"title": "VMCreateRequest"
}

Field details:

FieldTypeRequiredDescriptionConstraints
session_idstring | nullNonullable
vm_lifetime_secondsinteger | nullNonullable
memory_mbinteger | nullNonullable
vcpu_countinteger | nullNonullable
metadataobject | nullNonullable
envobject<string, string> | nullNonullable
env.*stringNo
egress_policyobject | nullNonullable
snapshot_idstring | nullNonullable
snapshot_on_terminateboolean | nullNonullable
snapshot_namestring | nullNonullable
shareobject | nullNonullable
share.portintegerNomin=1, max=65535
share.is_publicbooleanNodefault=false
custom_domainobject | nullNonullable
custom_domain.domainstringNo
custom_domain.dns_providerstring | nullNonullable
custom_domain.dns_credentialsobject<string, string> | nullNonullable
custom_domain.dns_credentials.*stringNo
image_variantstring | nullNonullable
volumesarray<object> | nullNonullable
volumes[]objectNo
volumes[].volume_idstringNo
volumes[].mount_pathstringNo
volumes[].modestringNodefault="rw"
volumes[].checkpoint_idstring | nullNonullable
vault_idsarray<string> | nullNonullable
vault_ids[]stringNo

Responses

200

Successful Response

application/json

Resolved schema:

{
"properties": {
"vm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Vm Id"
},
"session_id": {
"type": "string",
"title": "Session Id"
},
"status": {
"type": "string",
"title": "Status"
},
"share": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"title": "Share"
},
"custom_domain": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"title": "Custom Domain"
},
"env_status": {
"type": "string",
"title": "Env Status",
"default": "none"
},
"env_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Env Error"
}
},
"type": "object",
"required": [
"session_id",
"status"
],
"title": "VMCreateResponse"
}

Field details:

FieldTypeRequiredDescriptionConstraints
vm_idstring | nullNonullable
session_idstringYes
statusstringYes
shareobject | nullNonullable
custom_domainobject | nullNonullable
env_statusstringNodefault="none"
env_errorstring | nullNonullable

422

Validation Error

application/json

Resolved schema:

{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}

Field details:

FieldTypeRequiredDescriptionConstraints
detailarray<object>No
detail[]objectNo
detail[].locarray<string | integer>No
detail[].loc[]string | integerNo
detail[].msgstringNo
detail[].typestringNo