Create Server

Overview

This API create additional Dedicated Hypervisor server.

Classification

  • Create

API Operation Object

Synchronous / Asynchronous

  • Asynchronous

Request

HTTP Request Method

  • POST

HTTP Request Path

{api_endpoint}/v1.0/{tenant_id}/servers

HTTP Request Header

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

HTTP Request Body

Format

{
  "server": "<server>"
}

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
name plain String Name of your Dedicated Hypervisor/Baremetal server as a string. required - Terminate 400, 404
description plain String Description of your Dedicated Hypervisor server as a string. optional - Terminate 400, 404
networks plain Baremetal Server API - Network datatype If it is specified greater than two, default gateway is first network. required - Terminate 400, 413
adminPass plain String Password for the administrator. optional - Terminate 400
imageRef plain String The image reference for the desired image for your Dedicated Hypervisor server. Specify as an UUID or full URL. required - Terminate 404
flavorRef plain String The flavor reference for the desired flavor for your Dedicated Hypervisor server. Specify as an UUID or full URL. Parameters of id or links -> href in api_list_flavors page can be used as flavorRef parameter. required - Terminate 404
availability_zone plain String The availability zone name in which to launch the server. If omit this parameter, target availability_zone is random. optional - Terminate 400, 404
metadata plain Baremetal Server API - Metadata datatype Metadata key and value pairs. The maximum size of the metadata key and value is 255 bytes each. optional - Terminate 400, 413

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
200 normal end
400 specified parameter is invalid
401 unauthorized
403 tenant is not available
404 not found a specified item
405 request URL or method is invalid
413 parameter is over the maximum number
500 compute fault
503 out of stock
For some of the images, available flavor is restricted.
If you try to request with the unsupported combination of imageRef and flavorRef, it will result in status code 400.

HTTP Response Body

Format

{
  "server": "<server>"
}

Response Parameter

Response Parameters
item format   description
server CreatedServer   Server to be Created.

Sample Request and Response

Sample API Request

Request URI

https://dedicated-hypervisor-jp1-ecl.api.ntt.com/v1.0/b322a85578de48beba0f92acce57869b/servers

HTTP Request Header

PUT /v1.0/b322a85578de48beba0f92acce57869b/servers HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.150.51:8774
Content-Type: application/json
Accept: application/json
X-Auth-Token: 62d528dc0cca4827b0ed465efe1c2588

HTTP Request Body

{
    "server": {
        "name": "server-test-1",
        "adminPass": "aabbccddeeff",
        "imageRef": "b5660a6e-4b46-4be3-9707-6b47221b454f",
        "flavorRef": "05184ba3-00ba-4fbc-b7a2-03b62b884931",
        "availability_zone": "zone1-groupa",
        "networks": [
            {
                "uuid": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
                "fixed_ip" : "10.0.0.100",
                "segmentation_id": 2001
            },
            {
                "uuid": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
                "fixed_ip" : "10.0.0.101",
                "segmentation_id": 2001
            }
        ],
        "metadata": {
            "foo": "bar"
        }
    }
}

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": {
        "id": "05184ba3-00ba-4fbc-b7a2-03b62b884931",
        "links": [
            {
                "href": "https://dedicated-hypervisor-jp1-ecl.api.ntt.com/v1.0/openstack/servers/05184ba3-00ba-4fbc-b7a2-03b62b884931",
                "rel": "self"
            },
            {
                "href": "https://dedicated-hypervisor-jp1-ecl.api.ntt.com/openstack/servers/05184ba3-00ba-4fbc-b7a2-03b62b884931",
                "rel": "bookmark"
            }
        ],
        "adminPass": "aabbccddeeff"
    }
}