Create a Server

Description

Use this request to create a new server. To create a server, you must choose an operating system template, which will be used to configure the server and install an operating system in it. If the customer account to which the user belongs has more than one subscription, you must supply the subscription ID you are creating the server for (see Request Parameters below). If the server you are trying to create exceeds the subscription server limit, the operation will fail with HTTP error 406: "Subscription limit for VE number exceeded".

Syntax

POST baseURL/ve

Request Parameters

Element

Attribute

Description

ve

 

Container for new server information.

 

custom-ns

Specifies whether the user will be allowed to permanently modify the name server settings inside the server being created.

Type: boolean

name

 

Server name.

Type: string

hostname

 

Server hostname.

Type: string

description

 

Server description.

Type: string

subscription-id

 

Subscription ID to the new server is being created for. This element must be included and populated if the customer account to which the user belongs has more than one subscription. If there is only one subscription, the element can be omitted.

Type: int

cpu

 

Container for CPU information.

 

number

Number of CPU cores.

Type: int

 

power

CPU clock rate in Mhz.

Type: int

ram-size

 

RAM size in megabytes.

Type: int

bandwidth

 

Network bandwidth in kbps.

Type: int

no-of-public-ip

 

Number of public IPv4 addresses.

Type: int

no-of-public-ipv6

 

Number of public IPv6 addresses.

Type: int

ve-disk

 

Container for hard disk information. At the time of writing, only one hard disk can be added to a server. This will change in the future.

 

local

Local or network hard disk. Only local disks are supported at the time of this writing.

Type: boolean

 

primary

Specifies whether the disk should be a system disk. This is a reserved parameter.

Type: boolean

 

size

Hard disk size in gigabytes.

Type: int

platform

 

Container for computing platform information.

template-info

 

Container or operating system template info.

 

name

OS template name. A template contains all the necessary information about the virtualization technology it uses, the operating system, and other information. To obtain the list of the available templates, use the GET /template API call.

Type: string

os-info

 

Container for operating system information.

 

technology

Virtualization technology:

  • CT – container.
  • VM – virtual machine.

Type: string

 

type

Operating system type.

backup-schedule

 

Container for backup schedule information. This element is optional. If omitted, no backups of the server will be performed.

 

name

Backup schedule name. Backup schedules are created and maintained by the system administrator. Use the schedule interface to obtain the list of the available backup schedules.

Type: string

Response

Element

Attribute

Description

pwd-response

 

Container for response data.

message

 

A text message describing the status of the operation.

password

 

Server administrator password. If the password was supplied in the request, this element will contain that password. If the password was not provided, this element will contain an automatically generated one.

Example

Request

POST https://c2u-web:4465/paci/v1.0/ve

Request body

<?xml version="1.0" encoding="UTF-8"?>
<ve custom-ns="true">
  <name>Web60</name>
  <hostname>Web60.1000043.com</hostname>
  <description>VE Linux 40</description>
  <subscription-id>1000001</subscription-id>
  <cpu number="2" power="1600"/>
  <ram-size>512</ram-size>
  <bandwidth>100</bandwidth>
  <no-of-public-ip>2</no-of-public-ip> 
  <no-of-public-ipv6>2</no-of-public-ipv6> 
  <ve-disk local="true" size="3"/> 
  <platform>
    <template-info name="centos-6-x86_64"/>
      <os-info technology="CT" type="linux-free"/>
  </platform>
  <backup-schedule name="daily"/>
</ve>

Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pwd-response>
    <message>VE create initiated</message>
    <password>152eyyBHO</password>
</pwd-response>