Skip to content

Starting, stopping and deleting instances

Every call on this page was run against production on a disposable instance, so the examples below are the real requests and responses.

Send your console API key in an Authorization header. See API keys for how to create one.

Terminal window
export CL_KEY="clk_live_your_key_here"
export VM_ID="30035038-738f-46b0-82b0-a634261b1bf4"

An instance is either running or stopped, and that determines which actions are available:

Current state You can
Running pause, reboot, stop
Stopped start

Starting an instance that is already running, or stopping one that is already stopped, is not something the console offers — check the state first with GET /vm/get/{id} if you are automating this.

POST /vm/create

Terminal window
curl -X POST https://console.cloudlogics.com/api/v1/vm/create \
-H "Authorization: Bearer $CL_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "web-01",
"flavor_id": "bx1aL",
"image_id": "232f283d-672b-4aee-a2dc-71bebdb535df",
"size": "50",
"region": "us-ftw-1",
"id": "42",
"owner": "your-username",
"project": "my-project-a1b2"
}'

Returns 202, not 200:

{ "data": "server provisioning" }

Three fields in this payload are easy to get wrong:

Field What it actually is
id your user ID, as a string ("42") — not an instance ID
owner your username or your email address; either works, and the email is what gets stored
size the data volume in GB — required, and at least 1. Empty or "0" is rejected with 400, so every instance gets a data volume, and it outlives the instance

flavor_id accepts either the flavor’s name (bx1aL) or its ID from GET /flavor.

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

To build an instance with no public IP, add "skip_floating_ip": true — see Creating an instance without a public IP.

POST /vm/start/{id}

Terminal window
curl -X POST https://console.cloudlogics.com/api/v1/vm/start/$VM_ID \
-H "Authorization: Bearer $CL_KEY"
{ "data": "instance started" }

No request body.

POST /vm/stop/{id}

Terminal window
curl -X POST https://console.cloudlogics.com/api/v1/vm/stop/$VM_ID \
-H "Authorization: Bearer $CL_KEY"
{ "data": "instance stopped" }

No request body. Unlike create, this call blocks until the instance has actually stopped — about 20 seconds in testing. Set your client timeout accordingly; a 200 here means the instance really is down.

POST /vm/reboot/{id}

Terminal window
curl -X POST https://console.cloudlogics.com/api/v1/vm/reboot/$VM_ID \
-H "Authorization: Bearer $CL_KEY"
{ "data": "instance rebooted" }

No request body.

POST /vm/rename/{id}

Terminal window
curl -X POST https://console.cloudlogics.com/api/v1/vm/rename/$VM_ID \
-H "Authorization: Bearer $CL_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "web-01-renamed"}'
{ "data": "instance renamed" }

The same name rules as create apply: 3–50 characters, one word, a-z, 0-9 and hyphens, lowercased.

DELETE /vm/delete/{id}

Terminal window
curl -X DELETE https://console.cloudlogics.com/api/v1/vm/delete/$VM_ID \
-H "Authorization: Bearer $CL_KEY"
{
"data": {
"message": "instance deleted",
"preserved_volumes": ["d12d0476-cb17-493a-91a4-ae7299f0142d"]
}
}

Like stop, delete blocks until the instance is actually gone.