Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Children Display
alltrue
styleh3
pageSuperb Cloud API

GET /virtual_machines/status

Get statuses for all your Virtual Machines

Sections:

Table of Contents
maxLevel4
minLevel2
includeResponse.*|JSON.*|XML.*|Explanation.*

Response Parameters

id - virtual server ID

identifier — the VS identifier

hostname — the name of your host

template_id — the ID of the template the VS is based on

built — true if the VS is built, otherwise false

locked — true if the VS is locked; otherwise false

booted — true if the VS is running, otherwise false

operating_system — operating system used by the VS

suspended — true if VS is suspended, otherwise false

enable_autoscale — true if autoscaling is allowed for this VS

state – virtual server state

JSON Request example

Code Block
languagebash
themeRDark
 curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:password --url <api_url>/virtual_machines/status.json

JSON Response

Code Block
themeRDark
 [
    {
        "virtual_machine": {
            "id": 489,
            "identifier": "p1sd837fuofl73",
            "hostname": "myHost",
            "template_id": 128,
            "built": true,
            "locked": false,
            "booted": true,
            "operating_system": "linux",
            "suspended": false,
            "enable_autoscale": null,
            "state": "delivered"
        }
    }
]

XML Request example

Code Block
languagebash
themeRDark
 curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:password --url <api_url>/virtual_machines/status.xml

XML Response example

Code Block
languagexml
themeRDark
 <virtual_machines type="array">
  <virtual_machine>
    <id type="integer">1</id>
    <identifier>oku1sief887rqm</identifier>
    <hostname>vl.test</hostname>
    <template_id type="integer">1</template_id>
    <built type="boolean">true</built>
    <locked type="boolean">false</locked>
    <booted type="boolean">true</booted>
    <operating_system>linux</operating_system>
    <suspended type="boolean">false</suspended>
    <enable_autoscale type="boolean">true</enable_autoscale>
    <state>new</state>
  </virtual_machine>
  ...
</virtual_machines>