Create VM
const url = 'https://console.cloudlogics.com/api/v1/vm/create';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"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}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”VM creation request
object
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.
Example
bx1aLYour USER id, as a string. This is not an instance id, and the instance’s own id is not known until provisioning finishes.
Example
42The base image UUID. Call GET /image for the list.
Example
232f283d-672b-4aee-a2dc-71bebdb535df3-50 characters, a single word of a-z, 0-9 and hyphens. Uppercase is converted to lowercase.
Example
web-01Your username or your email address; either is accepted, and the email is what gets stored.
Example
your-usernameThe project to build in.
Example
my-project-a1b2The region to build in. Call GET /region for the list.
Example
us-ftw-1Root 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.
Example
50Data 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).
Example
50True 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.
Example
falseResponses
Section titled “Responses”Accepted. The instance does not exist yet: provisioning takes about a minute, and the response carries no instance id.
A plain acknowledgement. The message text is the whole payload.
object
Example
{ "data": "server provisioning"}Bad request
object
object
object
Examplegenerated
{ "data": "example", "error": { "code": 1, "message": "example" }, "page": { "next": "example", "prev": "example", "total_size": 1 }}Conflict
object
object
object
Examplegenerated
{ "data": "example", "error": { "code": 1, "message": "example" }, "page": { "next": "example", "prev": "example", "total_size": 1 }}Internal server error
object
object
object
Examplegenerated
{ "data": "example", "error": { "code": 1, "message": "example" }, "page": { "next": "example", "prev": "example", "total_size": 1 }}