Skip to content

Create VM

POST
/api/v1/vm/create
curl --request POST \
--url https://console.cloudlogics.com/api/v1/vm/create \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "flavor_id": "bx1aL", "id": "42", "image_id": "232f283d-672b-4aee-a2dc-71bebdb535df", "name": "web-01", "owner": "your-username", "project": "my-project-a1b2", "region": "us-ftw-1", "root_size": "50", "size": "50", "skip_floating_ip": false }'

Provisioning is asynchronous. A 202 means the request was accepted, not that the instance exists. It takes about a minute, and the response does not contain the new instance’s id — poll GET /vm and match on the name you used.

Two fields are easy to get wrong: id is your user id, as a string, not an instance id; and size is required and must be at least 1 — every instance gets a data volume, and it outlives the instance.

To build an instance with no public IP, send "skip_floating_ip": true; it will have only its private-network address.

Create a new virtual machine

VM creation request

Media typeapplication/json
object
flavor_id
required

The instance size, as either the flavor name (bx1aL) or the flavor ID from GET /flavor; both are accepted. Listed does not always mean provisionable.

string
Example
bx1aL
id
required

Your USER id, as a string. This is not an instance id, and the instance’s own id is not known until provisioning finishes.

string
Example
42
image_id
required

The base image UUID. Call GET /image for the list.

string
Example
232f283d-672b-4aee-a2dc-71bebdb535df
name
required

3-50 characters, a single word of a-z, 0-9 and hyphens. Uppercase is converted to lowercase.

string
Example
web-01
owner
required

Your username or your email address; either is accepted, and the email is what gets stored.

string
Example
your-username
project
required

The project to build in.

string
Example
my-project-a1b2
region
required

The region to build in. Call GET /region for the list.

string
Example
us-ftw-1
root_size

Root volume size in GB, as a string. Empty means the 50GB default. This cannot be changed after creation: the API refuses to resize a root disk, so choose it with growth in mind, or keep growing data on a data volume, which can be extended.

string
Example
50
size
required

Data volume size in GB, as a string. Required on production, and must be at least 1: an empty value or “0” is rejected with 400. The console accepts 1 to 1600. Every instance therefore has a data volume, and it survives deletion of the instance (see DELETE /vm/delete).

string
Example
50
skip_floating_ip

True builds the instance with no public IP: it gets only an address on the project’s private network. Omitted or false, it also gets a public floating IP. Verified on production both ways.

boolean
Example
false

Accepted. The instance does not exist yet: provisioning takes about a minute, and the response carries no instance id.

Media typeapplication/json

A plain acknowledgement. The message text is the whole payload.

object
data
string
Example
{
"data": "server provisioning"
}

Bad request

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}

Conflict

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}

Internal server error

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}