Virtual Machine
Endpoints for virtual machine management across different cloud providers like Azure, AWS, and Kraud.Cloud. This includes creating, deleting, updating, and retrieving VM details
It is important to note that the password and shh keys for remote access are stored in Vault.
Create virtual machine
POST
{{BASE_URL}}/api/virtual-machines
Virtual Machine Creation. Currently, only ( Kraud.Cloud, Azure, AWS ) can be created.
Headers
Authorization*
String
Bearer Token
Request Body
data*
Object
[
{
"region": {
"datacenter": {
"name": "berlin",
"displayName": "Berlin"
},
"physicalLocation": "Germany"
},
"image": {
"version": {
"name": "20_04-lts",
"displayName": "20.04 LTS"
},
"distribution": "Ubuntu"
},
"attestationId": "5cb168ab-25de-4b20-9949-a07a2cf23e65",
"access": null,
"authMethod": 1,
"status": 0,
"isBlocked": false,
"tags": [],
"subscription": null,
"_id": "654a11e60b23ef1b0f36d44e",
"name": "kraud-cloud-ubuntu-1vcpu-4gb-berlin-01",
"provider": "6548a383e2442d14b6bf968b",
"size": "6548a383e2442d14b6bf9745",
"price": "6548a383e2442d14b6bf970b",
"owner": "6548a41138406c14db33b606",
"project": "6548a41f38406c14db33b62c",
"team": "6548a41f38406c14db33b61e",
"ipConfigurations": [],
"createdAt": "2023-11-07T10:31:02.692Z",
"updatedAt": "2023-11-07T10:31:02.692Z"
}
]
Below is a screenshot of the Vault UI. This shows the path to the keys. From this path you can get the keys to remotely connect to the VM.
Below is an example of how to make this request. {{VAULT_URL}}/v1/enclaive-static/data/{teamId}/user/root?version=0

Get virtual machines
GET
{{BASE_URL}}/api/teams/{team}/projects/{project}/virtual-machines
Get all active virtual machines for a specific project.
Path Parameters
team*
String
Team ID
project*
String
Project ID
Headers
Authorization*
String
Bearer Token
[
{
"_id": "654a11e60b23ef1b0f36d44e",
"region": {
"datacenter": {
"name": "berlin",
"displayName": "Berlin"
},
"physicalLocation": "Germany"
},
"image": {
"version": {
"name": "20_04-lts",
"displayName": "20.04 LTS"
},
"distribution": "Ubuntu"
},
"attestationId": "5cb168ab-25de-4b20-9949-a07a2cf23e65",
"access": null,
"authMethod": 1,
"status": 3,
"isBlocked": false,
"tags": [],
"subscription": null,
"name": "kraud-cloud-ubuntu-1vcpu-4gb-berlin-01",
"provider": {
"_id": "6548a383e2442d14b6bf968b",
"type": "vm",
"isDisabled": false,
"cloudProvider": {
"_id": "6548a383e2442d14b6bf9685",
"name": "Kraud.Cloud",
"isDisabled": false
}
},
"size": {
"_id": "6548a383e2442d14b6bf9745",
"provider": "6548a383e2442d14b6bf968b",
"location": "berlin",
"name": "Standart_berlin_1_4_50",
"vCPUs": 1,
"memoryGB": 4,
"spaceGB": 50,
"group": 0
},
"price": {
"_id": "6548a383e2442d14b6bf970b",
"provider": "6548a383e2442d14b6bf968b",
"locationName": "berlin",
"sizeName": "Standart_berlin_1_4_50",
"imageName": "Ubuntu",
"pricePerHour": 0.04,
"pricePerMonth": 30,
"currencyCode": "EUR",
"createdAt": "2023-11-06T08:27:47.134Z",
"updatedAt": "2023-11-06T08:27:47.134Z"
},
"owner": "6548a41138406c14db33b606",
"project": "6548a41f38406c14db33b62c",
"team": "6548a41f38406c14db33b61e",
"ipConfigurations": [
{
"_id": "654a11f60b23ef1b0f36d46c",
"type": "public",
"method": "Dynamic",
"version": "IPv4",
"address": "185.112.181.100"
}
],
"createdAt": "2023-11-07T10:31:02.692Z",
"updatedAt": "2023-11-07T10:31:18.020Z",
"attestation": null
}
]
Get virtual machine
GET
{{BASE_URL}}/api/virtual-machines/{id}
Get a specific virtual machine by unique id.
Path Parameters
id*
String
Virtual machine ID
Headers
Authorization*
String
Bearer Token
{
"_id": "654a11e60b23ef1b0f36d44e",
"region": {
"datacenter": {
"name": "berlin",
"displayName": "Berlin"
},
"physicalLocation": "Germany"
},
"image": {
"version": {
"name": "20_04-lts",
"displayName": "20.04 LTS"
},
"distribution": "Ubuntu"
},
"attestationId": "5cb168ab-25de-4b20-9949-a07a2cf23e65",
"access": null,
"authMethod": 1,
"status": 3,
"isBlocked": false,
"tags": [],
"subscription": null,
"name": "kraud-cloud-ubuntu-1vcpu-4gb-berlin-01",
"provider": {
"_id": "6548a383e2442d14b6bf968b",
"type": "vm",
"isDisabled": false,
"cloudProvider": {
"_id": "6548a383e2442d14b6bf9685",
"name": "Kraud.Cloud",
"isDisabled": false
}
},
"size": {
"_id": "6548a383e2442d14b6bf9745",
"provider": "6548a383e2442d14b6bf968b",
"location": "berlin",
"name": "Standart_berlin_1_4_50",
"vCPUs": 1,
"memoryGB": 4,
"spaceGB": 50,
"group": 0
},
"price": {
"_id": "6548a383e2442d14b6bf970b",
"provider": "6548a383e2442d14b6bf968b",
"locationName": "berlin",
"sizeName": "Standart_berlin_1_4_50",
"imageName": "Ubuntu",
"pricePerHour": 0.04,
"pricePerMonth": 30,
"currencyCode": "EUR",
"createdAt": "2023-11-06T08:27:47.134Z",
"updatedAt": "2023-11-06T08:27:47.134Z"
},
"owner": "6548a41138406c14db33b606",
"project": {
"_id": "6548a41f38406c14db33b62c",
"name": "first-project",
"description": "Update your project information under Settings",
"environment": "Development",
"purpose": "Just trying out Enclaive",
"isDefault": false,
"icon": 1,
"owner": "6548a41138406c14db33b606",
"team": "6548a41f38406c14db33b61e",
"createdAt": "2023-11-06T08:30:23.552Z",
"updatedAt": "2023-11-07T08:52:28.154Z"
},
"team": {
"_id": "6548a41f38406c14db33b61e",
"name": "My Team",
"email": "[email protected]",
"members": [
{
"user": "6548a41138406c14db33b606",
"role": 0
}
],
"createdAt": "2023-11-06T08:30:23.529Z",
"updatedAt": "2023-11-06T12:56:06.337Z",
"billingSettings": "6548e2660919dc0442dc2ec7"
},
"ipConfigurations": [
{
"_id": "654a11f60b23ef1b0f36d46c",
"type": "public",
"method": "Dynamic",
"version": "IPv4",
"address": "185.112.181.100"
}
],
"createdAt": "2023-11-07T10:31:02.692Z",
"updatedAt": "2023-11-07T10:31:18.020Z",
"attestation": null
}
Stop virtual machine
PUT
{{BASE_URL}}/api/virtual-machines/{id}/stop
Stop virtual machine by unique id.
Path Parameters
id*
String
Virtual machine ID
Headers
Authorization*
String
Bearer Token
{"message":"Virtual machine is stopped","vmId":"654a11e60b23ef1b0f36d44e"}
Start virtual machine
PUT
{{BASE_URL}}/api/virtual-machines/{id}/start
Start virtual machine by unique id.
Path Parameters
id*
String
Virtual machine ID
Headers
Authorization*
String
Bearer Token
{"message":"Virtual machine is running","vmId":"654a11e60b23ef1b0f36d44e"}
Delete virtual machine
DELETE
{{BASE_URL}}/api/virtual-machines/{id}
Delete a specific virtual machine by unique id.
Path Parameters
id*
String
Virtual machine ID
Headers
Authorization*
String
Bearer Token
{"message":"Virtual machine is deleted","vmId":"654a10fd619e4f1a657135bd"}
Last updated
Was this helpful?