Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

API Essentials

API Key Generation





Firewall Rules

Flex Cloud VM Control

Getting Started with Superb Flex Cloud

IP Addresses


Network Interfaces


SSH Keys


Test Route

Troubleshooting API Issues

Viewing Activity Logs

Virtual Server Operating Systems

Virtual Servers

VS Disks

POST /virtual_machines/:virtual_machine_id/build 

Build or re-build a VM


Request Parameters

template_id* - the ID of a template from which a VS should be built.

required_startup - set to 1 if you wish to start a VS after it is built. Otherwise set to 0.

Instead of virtual server ID (:virtual_machine_id) you may use virtual server identifier (:virtual_machine_identifier).

initial_root_password_encryption_key -  specify the password encryption passphrase

for Windows templates you should specify the licensing type:

licensing_type - the type of a license: makkms or user own license

licensing_key - the key of a license, required if you have selected OWN licensing type, and not required for MAK and KMS licensing types

licensing_server_id - the ID of a template group where the KMS server details are indicated and to which the template belongs (either directly or through the child group)

Response Parameters

Returns Virtual Machine Object

JSON Request example

 curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass -d '{"virtual_machine":{"template_id":"1","required_startup":"1"}}' --url http://onapp.test/virtual_machines/:virtual_machine_id/build.json

JSON Response

    "virtual_machine": {
        "add_to_marketplace": null,
        "admin_note": null,
        "allowed_hot_migrate": true,
        "allowed_swap": true,
        "booted": false,
        "built": false,
        "cores_per_socket": 0,
        "cpu_shares": 1,
        "cpu_sockets": null,
        "cpu_threads": null,
        "cpu_units": 10,
        "cpus": 1,
        "created_at": "2015-08-25T21:52:34+00:00",
        "customer_network_id": null,
        "deleted_at": null,
        "edge_server_type": null,
        "enable_autoscale": null,
        "enable_monitis": null,
        "firewall_notrack": false,
        "hostname": "zaza",
        "hypervisor_id": 12,
        "id": 502,
        "identifier": "abcde224e600fv",
        "initial_root_password_encrypted": false,
        "iso_id": null,
        "label": "zaza",
        "local_remote_access_ip_address": "",
        "local_remote_access_port": null,
        "locked": true,
        "memory": 20000,
        "min_disk_size": 5,
        "note": null,
        "operating_system": "linux",
        "operating_system_distro": "lbva",
        "preferred_hvs": [
        "recovery_mode": null,
        "remote_access_password": "password",
        "service_password": null,
        "state": "failed",
        "storage_server_type": null,
        "strict_virtual_machine_id": null,
        "suspended": false,
        "template_id": 10,
        "template_label": "Load Balancer Virtual Appliance",
        "updated_at": "2015-08-26T18:43:18+00:00",
        "user_id": 123,
        "vip": null,
        "xen_id": null,
        "ip_addresses": [
                "ip_address": {
                    "address": "",
                    "broadcast": "",
                    "created_at": "2015-07-30T01:35:54+00:00",
                    "customer_network_id": null,
                    "disallowed_primary": false,
                    "gateway": "",
                    "hypervisor_id": null,
                    "id": 1667,
                    "ip_address_pool_id": null,
                    "network_address": "",
                    "network_id": 1,
                    "pxe": false,
                    "updated_at": "2015-08-25T21:52:34+00:00",
                    "user_id": null,
                    "free": false,
                    "netmask": ""
        "monthly_bandwidth_used": "0",
        "total_disk_size": 26,
        "price_per_hour": 0.28557783000000003,
        "price_per_hour_powered_off": 0.007083389999999999,
        "support_incremental_backups": true,
        "cpu_priority": 1

XML Request example

 curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass -d '<?xml version="1.0" encoding="UTF-8"?><virtual_machine><template_id>1</template_id><required_startup>1</required_startup></virtual_machine>' --url http://onapp.test/virtual_machines/:virtual_machine_id/build.xml

XML Response example

  • No labels