2.1.4. Get Server Details

Verb URI Description
GET /servers/id Lists details for a specified server.

Normal Response Codes: 200, 203

Error Response Codes: computeFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), itemNotFound (404), Method Not Allowed (405), overLimit (413), serviceUnavailable (503)

This operation returns the details of a specified server.

Specify the server ID as id in the URI.

This operation does not require a request body.

This operation returns a response body, which contains details for the specified server.

The following table describes the fields that are returned in the response body:

Table 2.4. Get Server Details Response Fields
Name Description
accessIPv4

The public IP version 4 access address.

[Note]Note

The accessIPv4 and accessIPv6 are fields that populate once the server is ready to use. Before that, use the information beneath the addresses list to get the IP address.

accessIPv6

The public IP version 6 access address.

[Note]Note

The accessIPv4 and accessIPv6 are fields that populate once the server is ready to use. Before that, use the information beneath the addresses list to get the IP address.

addresses

Public and private IP addresses, The version field indicates whether the IP address is version 4 or 6.

created

The time stamp for the creation date.

flavor

The flavor ID. For a list of flavors, see Section 2.6.1, “List Flavors”.

hostId

The host ID. The compute provisioning algorithm has an anti-affinity property that attempts to spread customer VMs across hosts. Under certain situations, VMs from the same customer might be placed on the same host. hostId represents the host your server runs on and can be used to determine this scenario if it is relevant to your application.

HostId is unique per account and is not globally unique.

id

The server ID.

image

The image ID. For a list of images, see Section 2.7.1, “List Images”.

links

Server links.

metadata

Metadata key and value pairs.

name

The server name.

progress

The build completion progress, as a percentage. Value is from 0 to 100.

status

The server status. See Server Status Values.

tenant_id

The tenant ID.

updated

The time stamp for the last update.

user_id

The user ID.

Extended elements
RAX-SI:image_schedule

Extended element. The image schedule reference is included only if scheduled images has been enabled for this server. For information about this element, see Section 3.5, “Scheduled Images Extension”.

The namespace for this extended element is:

xmlns:RAX-SI="http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0"

Extended attributes
OS-DCF:diskConfig

Extended attribute. The disk configuration value.

Valid values are:

  • AUTO. The server is built with a single partition the size of the target flavor disk. The file system is automatically adjusted to fit the entire partition. This keeps things simple and automated. AUTO is valid only for images and servers with a single partition that use the EXT3 file system. This is the default setting for applicable Rackspace base images.

  • MANUAL. The server is built using whatever partition scheme and file system is in the source image. If the target flavor disk is larger, the remaining disk space is left unpartitioned. This enables images to have non-EXT3 file systems, multiple partitions, and so on, and enables you to manage the disk configuration.

The namespace for this extended attribute is:

xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"

See Section 3.1, “Disk Configuration Extension”.

OS-EXT-STS

Extended attributes. Shows the following extended statuses for servers:

  • OS-EXT-STS:vm_state. The VM state.

  • OS-EXT-STS:task_state. The task state.

  • OS-EXT-STS:power_state. The power state.

The namespace for this extended attribute is:

xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/api/v1.1"

See Section 3.2, “Extended Status Extension”

 

Example 2.16. Get Server Details: JSON Response

{
    "server": {
        "OS-DCF:diskConfig": "AUTO", 
        "OS-EXT-STS:power_state": 1, 
        "OS-EXT-STS:task_state": null, 
        "OS-EXT-STS:vm_state": "active", 
        "accessIPv4": "198.101.241.238", 
        "accessIPv6": "2001:4800:780e:0510:d87b:9cbc:ff04:513a", 
        "addresses": {
            "private": [
                {
                    "addr": "10.180.3.171", 
                    "version": 4
                }
            ], 
            "public": [
                {
                    "addr": "198.101.241.238", 
                    "version": 4
                }, 
                {
                    "addr": "2001:4800:780e:0510:d87b:9cbc:ff04:513a", 
                    "version": 6
                }
            ]
        }, 
        "created": "2012-08-16T18:41:43Z", 
        "flavor": {
            "id": "2", 
            "links": [
                {
                    "href": "https://dfw.servers.api.rackspacecloud.com/010101/flavors/2", 
                    "rel": "bookmark"
                }
            ]
        }, 
        "hostId": "33ccb6c82f3625748b6f2338f54d8e9df07cc583251e001355569056", 
        "id": "ef08aa7a-b5e4-4bb8-86df-5ac56230f841", 
        "image": {
            "id": "3afe97b2-26dc-49c5-a2cc-a2fc8d80c001", 
            "links": [
                {
                    "href": "https://dfw.servers.api.rackspacecloud.com/010101/images/3afe97b2-26dc-49c5-a2cc-a2fc8d80c001", 
                    "rel": "bookmark"
                }
            ]
        }, 
        "links": [
            {
                "href": "https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/ef08aa7a-b5e4-4bb8-86df-5ac56230f841", 
                "rel": "self"
            }, 
            {
                "href": "https://dfw.servers.api.rackspacecloud.com/010101/servers/ef08aa7a-b5e4-4bb8-86df-5ac56230f841", 
                "rel": "bookmark"
            }
        ], 
        "metadata": {
            "My Server Name": "API Test Server 2"
        }, 
        "name": "api-test-server 2", 
        "progress": 100,  
        "status": "ACTIVE", 
        "tenant_id": "010101", 
        "updated": "2012-08-16T18:50:38Z", 
        "user_id": "170454"
    }
}

 

Example 2.17. Get Server Details for a Server with Scheduled Images Enabled: JSON Response

{
    "server": {
        "OS-DCF:diskConfig": "AUTO", 
        "OS-EXT-STS:power_state": 1, 
        "OS-EXT-STS:task_state": null, 
        "OS-EXT-STS:vm_state": "active", 
        "RAX-SI:image_schedule": {
            "retention": 3
        }, 
        "accessIPv4": "5.79.23.47", 
        "accessIPv6": "2a00:1a48:7805:112:dc21:7ec0:ff08:4bb4", 
        "addresses": {
            "private": [
                {
                    "addr": "10.179.3.116", 
                    "version": 4
                }
            ], 
            "public": [
                {
                    "addr": "5.79.23.47", 
                    "version": 4
                }, 
                {
                    "addr": "2a00:1a48:7805:0112:dc21:7ec0:ff08:4bb4", 
                    "version": 6
                }
            ]
        }, 
        "created": "2013-04-04T20:10:30Z", 
        "flavor": {
            "id": "2", 
            "links": [
                {
                    "href": "https://lon.servers.api.rackspacecloud.com/10099999/flavors/2", 
                    "rel": "bookmark"
                }
            ]
        }, 
        "hostId": "8db66bfe16771e6505e87ced4d8f5a23916faf3105c7837eae12daba", 
        "id": "4aad5702-b54a-4190-9953-966805a61a4a", 
        "image": {
            "id": "c195ef3b-9195-4474-b6f7-16e5bd86acd0", 
            "links": [
                {
                    "href": "https://lon.servers.api.rackspacecloud.com/10099999/images/c195ef3b-9195-4474-b6f7-16e5bd86acd0", 
                    "rel": "bookmark"
                }
            ]
        }, 
        "links": [
            {
                "href": "https://lon.servers.api.rackspacecloud.com/v2/10099999/servers/4aad5702-b54a-4190-9953-966805a61a4a", 
                "rel": "self"
            }, 
            {
                "href": "https://lon.servers.api.rackspacecloud.com/10099999/servers/4aad5702-b54a-4190-9953-966805a61a4a", 
                "rel": "bookmark"
            }
        ], 
        "metadata": {}, 
        "name": "linux-server", 
        "progress": 100, 
        "status": "ACTIVE", 
        "tenant_id": "10099999", 
        "updated": "2013-06-03T17:29:46Z", 
        "user_id": "12345"
    }
}


 

Example 2.18. Get Server Details: XML Response

<?xml version='1.0' encoding='UTF-8'?>
<server
    xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
    xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/api/v1.1"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns="http://docs.openstack.org/compute/api/v1.1" status="BUILD"
    updated="2012-08-16T18:48:41Z"
    hostId="0b88822e7a5db46eb95b69c0608733904b2cd4f18b0c1e418eb06e1c"
    name="api-test-server-xml" created="2012-08-16T18:48:23Z"
    userId="170454" tenantId="010101" accessIPv4="" accessIPv6=""
    progress="25" id="0f828bfb-609c-4042-be41-6dcc1b76228f"
    OS-EXT-STS:vm_state="building" OS-EXT-STS:task_state="spawning"
    OS-EXT-STS:power_state="0" OS-DCF:diskConfig="AUTO">
    <image id="3afe97b2-26dc-49c5-a2cc-a2fc8d80c001">
        <atom:link
            href="https://dfw.servers.api.rackspacecloud.com/010101/images/3afe97b2-26dc-49c5-a2cc-a2fc8d80c001"
            rel="bookmark"/>
    </image>
    <flavor id="2">
        <atom:link
            href="https://dfw.servers.api.rackspacecloud.com/010101/flavors/2"
            rel="bookmark"/>
    </flavor>
    <metadata>
        <meta key="My Server Name">API Test Server XML</meta>
    </metadata>
    <addresses>
        <network id="public">
            <ip version="6"
                addr="2001:4800:780e:0510:d87b:9cbc:ff04:5146"/>
            <ip version="4" addr="198.101.242.212"/>
        </network>
        <network id="private">
            <ip version="4" addr="10.180.15.103"/>
        </network>
    </addresses>
    <atom:link
        href="https://dfw.servers.api.rackspacecloud.com/v2/010101/servers/0f828bfb-609c-4042-be41-6dcc1b76228f"
        rel="self"/>
    <atom:link
        href="https://dfw.servers.api.rackspacecloud.com/010101/servers/0f828bfb-609c-4042-be41-6dcc1b76228f"
        rel="bookmark"/>
</server>

 

Example 2.19. Get Server Details for a Server with Scheduled Images Enabled: XML Response

<?xml version="1.0" encoding="UTF-8"?>
<server
  xmlns:RAX-SI="http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0"
  xmlns:OS-DCF="http://docs.openstack.org/compute/ext/disk_config/api/v1.1"
  xmlns:OS-EXT-STS="http://docs.openstack.org/compute/ext/extended_status/api/v1.1"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns="http://docs.openstack.org/compute/api/v1.1"
  status="ACTIVE" 
  updated="2013-06-03T17:29:46Z"
  hostId="8db66bfe16771e6505e87ced4d8f5a23916faf3105c7837eae12daba"
  name="linux-server"
  created="2013-04-04T20:10:30Z"
  userId="12345"
  tenantId="10099999"
  accessIPv4="5.79.23.47"
  accessIPv6="2a00:1a48:7805:112:dc21:7ec0:ff08:4bb4"
  progress="100"
  id="4aad5702-b54a-4190-9953-966805a61a4a"
  OS-EXT-STS:vm_state="active"
  OS-EXT-STS:task_state="None"
  OS-EXT-STS:power_state="1"
  OS-DCF:diskConfig="AUTO">
  <image id="c195ef3b-9195-4474-b6f7-16e5bd86acd0">
    <atom:link href="https://lon.servers.api.rackspacecloud.com/1009999/images/c195ef3b-9195-4474-b6f7-16e5bd86acd0" rel="bookmark"/>
  </image>
  <flavor id="2">
    <atom:link href="https://lon.servers.api.rackspacecloud.com/10099999/flavors/2" rel="bookmark"/>
  </flavor>
  <metadata/>
  <addresses>
    <network id="public">
      <ip version="4" addr="5.79.23.47"/>
      <ip version="6" addr="2a00:1a48:7805:0112:dc21:7ec0:ff08:4bb4"/>
    </network>
    <network id="private">
      <ip version="4" addr="10.179.3.116"/>
    </network>
  </addresses>
  <atom:link href="https://lon.servers.api.rackspacecloud.com/v2/10099999/servers/4aad5702-b54a-4190-9953-966805a61a4a" rel="self"/>
  <atom:link href="https://lon.servers.api.rackspacecloud.com/10099999/servers/4aad5702-b54a-4190-9953-966805a61a4a" rel="bookmark"/>
  <RAX-SI:image_schedule>
    <retention>3</retention>
  </RAX-SI:image_schedule>
</server>




loading table of contents...