Enclaive Multi Cloud Platform
HomeDocumentationTutorialsTry Cloud
  • Enclaive Multi Cloud Platform
  • Documentation
    • What is EMCP?
    • Why use EMCP?
    • Features
      • Virtual HSM
      • Vault
      • Nitride
      • Buckypaper
      • Dyneemes
      • Morphism
    • Supported Cloud Platforms
  • Tutorials
    • Buckypaper
      • Create a Buckypaper VM
      • Connect with SSH
      • Manage DNS
        • Cloudflare
      • Tag Buckypaper
      • Secure your VM with Firewall
      • Turn on/off Buckypapers
      • Destroy Buckypapers
    • Dyneemes
      • Create clusters
      • Connect to a cluster
      • Setup advanced monitoring
      • Upgrade without data loss
      • Add nodes and node pools
      • Drain and restart nodes
    • Data-in-use encrypting Database
      • Create a database cluster
      • Configure CNAME DNS record
      • Delete Applications
    • Applications
      • Create Nextcloud Hub
      • Configure CNAME DNS record
      • Delete Applications
      • After the installation
    • Billing
      • Add/Update payment method
      • Add/Change address
      • Add/Change VAT
    • Settings
      • Manage Team
        • Create a team
        • Delete a team
        • Invite team members
        • Remove team members
      • Bring your own Subscription
        • Azure
        • AWS
        • Google Cloud Platform
    • Account
      • Registration
      • Login
      • Delete account
  • Developers
    • API
      • Console
        • Auth
          • JWKS
        • Account
          • Need
        • Projects
          • Activity
        • Manage
          • Application
            • DNS
          • Database
          • Kubernetes
          • Virtual Machine
            • Security rule
          • Configurations
            • Location
            • Image
            • Price
            • Size
            • Provider
            • Cloud Provider
          • Attestation
        • vHSM
          • BYOS
          • User Storage
        • Settings
          • Team
          • Invite
        • Billing
          • Settings
          • Invoice
          • Cost
          • Promo - TODO
        • Support
          • Hubspot Files
          • Ticket
      • Admin
        • Auth
        • Accounts
          • Team
            • User
            • Application
            • Virtual machine
            • Database
            • Cluster
            • Resource
        • Quotas
          • Default quota
          • Provider quota
          • Team quota
        • Invoices
  • Resources
    • Blog
    • GitHub
    • Youtube
    • CCx101
Powered by GitBook
On this page
  • Create virtual machine
  • Get virtual machines
  • Get virtual machine
  • Stop virtual machine
  • Start virtual machine
  • Delete virtual machine

Was this helpful?

  1. Developers
  2. API
  3. Console
  4. Manage

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

Name
Type
Description

Authorization*

String

Bearer Token

Request Body

Name
Type
Description

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"
    }
]
Request payload
{
    "cloudProvider": "6548a383e2442d14b6bf9685",
    "team": "6548a41f38406c14db33b61e",
    "project": "6548a41f38406c14db33b62c",
    "hostNames": [
        "kraud-cloud-ubuntu-1vcpu-4gb-berlin-01"
    ],
    "provider": "6548a383e2442d14b6bf968b",
    "size": "6548a383e2442d14b6bf9745",
    "price": "6548a383e2442d14b6bf970b",
    "subscription": "",
    "tags": [],
    "access": null,
    "region": {
        "physicalLocation": "Germany",
        "datacenter": {
            "name": "berlin",
            "displayName": "Berlin"
        }
    },
    "image": {
        "distribution": "Ubuntu",
        "version": {
            "name": "20_04-lts",
            "displayName": "20.04 LTS"
        }
    },
    "authMethod": 1,
    "quantity": 1
}

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

Name
Type
Description

team*

String

Team ID

project*

String

Project ID

Headers

Name
Type
Description

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

Name
Type
Description

id*

String

Virtual machine ID

Headers

Name
Type
Description

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": "john.doe@mail.com",
        "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

Name
Type
Description

id*

String

Virtual machine ID

Headers

Name
Type
Description

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

Name
Type
Description

id*

String

Virtual machine ID

Headers

Name
Type
Description

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

Name
Type
Description

id*

String

Virtual machine ID

Headers

Name
Type
Description

Authorization*

String

Bearer Token

{"message":"Virtual machine is deleted","vmId":"654a10fd619e4f1a657135bd"}

Last updated 1 year ago

Was this helpful?

Below is a screenshot of the UI. This shows the path to the keys. From this path you can get the keys to remotely connect to the VM.

Vault