Create Vm
POST /v1/vms
Authentication
Requires authentication via: OAuth2PasswordBearer.
Parameters
| Name | In | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
wait | query | boolean | No | Wait for VM to be provisioned | default=true |
X-API-Key | header | string | null | No | nullable |
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:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
session_id | string | null | No | nullable | |
vm_lifetime_seconds | integer | null | No | nullable | |
memory_mb | integer | null | No | nullable | |
vcpu_count | integer | null | No | nullable | |
metadata | object | null | No | nullable | |
env | object<string, string> | null | No | nullable | |
env.* | string | No | ||
egress_policy | object | null | No | nullable | |
snapshot_id | string | null | No | nullable | |
snapshot_on_terminate | boolean | null | No | nullable | |
snapshot_name | string | null | No | nullable | |
share | object | null | No | nullable | |
share.port | integer | No | min=1, max=65535 | |
share.is_public | boolean | No | default=false | |
custom_domain | object | null | No | nullable | |
custom_domain.domain | string | No | ||
custom_domain.dns_provider | string | null | No | nullable | |
custom_domain.dns_credentials | object<string, string> | null | No | nullable | |
custom_domain.dns_credentials.* | string | No | ||
image_variant | string | null | No | nullable | |
volumes | array<object> | null | No | nullable | |
volumes[] | object | No | ||
volumes[].volume_id | string | No | ||
volumes[].mount_path | string | No | ||
volumes[].mode | string | No | default="rw" | |
volumes[].checkpoint_id | string | null | No | nullable | |
vault_ids | array<string> | null | No | nullable | |
vault_ids[] | string | No |
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:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
vm_id | string | null | No | nullable | |
session_id | string | Yes | ||
status | string | Yes | ||
share | object | null | No | nullable | |
custom_domain | object | null | No | nullable | |
env_status | string | No | default="none" | |
env_error | string | null | No | nullable |
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:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
detail | array<object> | No | ||
detail[] | object | No | ||
detail[].loc | array<string | integer> | No | ||
detail[].loc[] | string | integer | No | ||
detail[].msg | string | No | ||
detail[].type | string | No |