Page tree
Skip to end of metadata
Go to start of metadata
Supported VersionsLast Updated
1.2.00 & higher
json output 1.14.00 & higher
2013/04/29
Note: for OpenVZ "custommemory" variable has to contain an amount of burstable memory, for example:  
$postfields["custommemory"] = "256:500";
where 
256 - Guaranteed RAM
500 - Burstable to RAM
Actionvserver-create
MethodGET, POST
Variables
type             [openvz|xen|xen hvm|kvm]
node             [name of node]
nodegroup        [name of nodegroup]
hostname         [hostname of virtual server]
password         [root password]
username         [client username]
plan             [plan name]
template         [template or iso name]
ips              [amount of ips]
randomipv4 [true|false] false is default
hvmt [0|1] default is 0. This allows to to define templates & isos for Xen HVM custommemory [overide plan memory with this amount] customdiskspace [overide plan diskspace with this amount] custombandwidth [overide plan bandwidth with this amount] customcpu [overide plan cpu cores with this amount] customextraip [add this amount of extra ips] issuelicense [1|2] 1 = cPanel monthly 2= cPanel yearly internalip [0|1] default is 0 rdtype [json] For json output specify json or for default output leave blank. This variable is optional
Example Output

XML

Success:

<status>success</status>
<statusmsg>Virtual server created</statusmsg>
<mainipaddress>123.123.123.123</mainipaddress>
<extraipaddress>122.122.122.122,111.111.111.111</extraipaddress>
<rootpassword>123456</rootpassword>
<vserverid>100</vserverid>
<consoleuser>console-123</consoleuser>
<consolepassword>123456</consolepassword>
<hostname>server.hostname.com</hostname>
<virtid>vm101|101</virtid>
<nodeid>1</nodeid>
<internalip>10.0.0.1</internalip>
<vncip>192.168.1.1</vncip>
<vncport>5901</vncport>
<vncpassword>123456</vncpassword>

Error:

<status>error</status>
<statusmsg>ERROR MESSAGE</statusmsg>

JSON

Success:

{
"status":"success",
"statusmsg":"Virtual server created",
"mainipaddress":"123.123.123.123",
"extraipaddress":"123.123.123.124,123.123.123.125",
"rootpassword":"UuasQS53",
"vserverid":"412",
"consoleuser":"console-P1RpHy",
"consolepassword":"UuasQS53",
"hostname":"test.com",
"virtid":"133",
"nodeid":"1"
}

Error:

{"status":"error","statusmsg":"ERROR MESSAGE"}
  • No labels