Update Server

Overview

This API updates your Baremetal server information.

Classification

  • Update

API Operation Object

Synchronous / Asynchronous

  • Synchronous

Request

HTTP Request Method

  • PUT

HTTP Request Path

{api_endpoint}/v2/{tenant_id}/servers/{server_id}

HTTP Request Header

Accept: application/json
X-Auth-Token: <token>

HTTP Request Body

Format

{
  "servers": "<servers>"
}

Request Parameter

Input Parameters
name style format description required/optional default value action for invalid parameter response code for invalid parameter
tenant_id URL UUID ID for the tenant. required - Terminate 403, 404
server_id URL UUID ID for the server. required - Terminate 404
name plain String` Name of the server as a string. optional - Terminate 404

Response

HTTP Response Header

Format

HTTP/1.1 200 OK
  • <response_code>: see “HTTP Responses” section
  • <message>: message based on the response code

Response Code

Response Codes
response code condition
202 normal response
400 specified parameter is invalid
401 unauthorized
403 tenant is not available
404 not found a specified item
413 any parameter is over the maximum number
500 compute fault

HTTP Response Body

Format

{
  "server": "<server>"
}

Response Parameter

Response Parameters
item format   description
server Server   Specified server.

Sample Request and Response

Sample API Request

Request URI

http://example.com/v2/b322a85578de48beba0f92acce57869b/servers/8b59526b-daf5-46db-9c44-e77c0a34bf2c

HTTP Request Header

PUT /v2/b322a85578de48beba0f92acce57869b/servers/8b59526b-daf5-46db-9c44-e77c0a34bf2c HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.150.51:8774
Accept: application/json
X-Auth-Token: 62d528dc0cca4827b0ed465efe1c2588

HTTP Request Body

{
  "server": {
    "name": "new-server-test"
  }
}

Sample API Response

HTTP Response Header

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: <content-length>
Date: Thu, 17 Jul 2014 04:21:06 GMT

HTTP Response Body

{
  "server": {
    "OS-EXT-STS:power_state": "RUNNING",
    "OS-EXT-STS:task_state": "None",
    "OS-EXT-STS:vm_state": "ACTIVE",
    "OS-EXT-AZ:availability_zone": "zone1-groupa",
    "created": "2012-09-07T16:56:37Z",
    "flavor": {
      "id": "05184ba3-00ba-4fbc-b7a2-03b62b884931",
      "links": [
        {
          "href": "http://openstack.example.com/openstack/flavors/05184ba3-00ba-4fbc-b7a2-03b62b884931",
          "rel": "bookmark"
        }
      ]
    },
    "hostId": "16d193736a5cfdb60c697ca27ad071d6126fa13baeb670fc9d10645e",
    "id": "05184ba3-00ba-4fbc-b7a2-03b62b884931",
    "image": {
      "id": "70a599e0-31e7-49b7-b260-868f441e862b",
      "links": [
        {
          "href": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
          "rel": "bookmark"
        }
      ]
    },
    "links": [
      {
        "href": "http://openstack.example.com/v2/openstack/servers/05184ba3-00ba-4fbc-b7a2-03b62b884931",
        "rel": "self"
      },
      {
        "href": "http://openstack.example.com/openstack/servers/05184ba3-00ba-4fbc-b7a2-03b62b884931",
        "rel": "bookmark"
      }
    ],
    "metadata": {
      "My Server Name": "Apache1"
    },
    "name": "new-server-test",
    "progress": 0,
    "status": "ACTIVE",
    "tenant_id": "openstack",
    "updated": "2012-09-07T16:56:37Z",
    "user_id": "fake",
    "raid_arrays": [
      {
        "primary_storage": true,
        "raid_card_hardware_id": "raid_card_uuid",
        "disk_hardware_ids": [
          "disk0_uuid",
          "disk1_uuid",
          "disk2_uuid",
          "disk3_uuid"
        ],
        "partitions": [
          {
            "lvm": true,
            "partition_label": "primary-part1"
          },
          {
            "lvm": false,
            "size": "100G",
            "partition_label": "var"
          }
        ]
      },
      {
        "primary_storage": false,
        "raid_card_hardware_id": "raid_card_uuid",
        "internal_disk_ids": [
          "disk4_uuid",
          "disk5_uuid",
          "disk6_uuid",
          "disk7_uuid"
        ],
        "raid_level": 10,
        "partitions": [
          {
            "lvm": true,
            "partition_label": "secondary-part1"
          }
        ]
      }
    ],
    "lvm_volume_groups": [
      {
        "vg_label": "VG_root",
        "physical_volume_partition_labels": [
          "primary-part1",
          "secondary-part1"
        ],
        "logical_volumes": [
          {
            "lv_label": "LV_root"
          },
          {
            "size": "2G",
            "lv_label": "LV_swap"
          }
        ]
      }
    ],
    "filesystems": [
      {
        "label": "LV_root",
        "mount_point": "/",
        "fs_type": "xfs"
      },
      {
        "label": "var",
        "mount_point": "/var",
        "fs_type": "xfs"
      },
      {
        "label": "LV_swap",
        "fs_type": "swap"
      }
    ],
    "nic_physical_ports": [
      {
        "id": "39285bf9-12fb-4064-b98b-a552efc51cfc",
        "mac_addr": "0a:31:c1:d5:6d:9c",
        "network_physical_port_id": "38268d94-584a-4f14-96ff-732a68aa7301",
        "plane": "data",
        "attached_ports": [
          {
            "port_id": "61b7da1e-9571-4d63-b779-e003a56b8105",
            "network_id": "9aa93722-1ec4-4912-b813-b975c21460a5",
            "fixed_ips": [
              {
                "subnet_id": "0419bbde-2b82-4107-9d8a-6bba76e364af",
                "ip_address": "192.168.10.2"
              }
            ]
          }
        ],
        "hardware_id": "c1e1546d-3063-46d0-8895-c6350eb691ff"
      }
    ],
    "chassis-status": {
      "chassis-power": true,
      "power-supply": true,
      "cpu": true,
      "memory": true,
      "fan": true,
      "etc": true
    }
  }
}