Server API Details

List all servers
GET /servers/list
Returns for each server, a list of
SERVER CPU MEM

 

Get single server info
GET /servers/SERVER/info
Returns KEY VALUE pairs:
server SERVER
status active | stopped | paused | dumped | dead
user owner of the server
Also KEY VALUE pairs for server configuration (see below).
For an active server, also KEY VALUE pairs as follows:
started start time expressed in seconds since the epoch, in UTC
[rx|tx]:[bytes|packets] Cumulative received/transmitted byte/packet count for NICs
ide:BUS[0-1]:UNIT[0-1]:[read|write]:[bytes|requests]
scsi:BUS[0]:UNIT[0-7]:[read|write]:[bytes|requests]
block:INDEX[0-7]:[read|write]:[bytes|requests]
Cumulative i/o byte/request count for each drive

 

Get all servers info
GET /servers/info
Returns for each server, KEY VALUE pairs as server info

 

Create and optionally start a server
POST /servers/create (also starts the server)
/servers/create/stopped
Expects KEY VALUE pairs for server configuration (see below).
Returns KEY VALUE pairs as server info

 

Start a server
POST /servers/SERVER/start
Expects Empty POST
Returns HTTP 204 No Content

 

Set server configuration
POST /servers/SERVER/set
Expects For a stopped server, KEY VALUE pairs for server configuration (see below).
For an active server, only KEY VALUE pairs as follows:
name Server name
cpu CPU quota in core MHz
persistent ‘true’ means that server will revert to a ‘stopped’ status on server stop or shutdown, rather than being destroyed automatically
tags optional, space-separated list of tags
user:* optional, user-defined KEY VALUE pairs
password Password for VNC access (maximum of 8 characters). If unset, VNC is disabled
Returns KEY VALUE pairs as server info
Notes Reconfigures a running server.

 

Stop a server
POST /servers/SERVER/stop
Expects Empty POST
Returns HTTP 204 No Content
Notes Kills the server immediately, equivalent to a power failure. Server reverts to a stopped status if it is persistent and is automatically destroyed otherwise.

 

Destroy a server
POST /servers/SERVER/destroy
Expects Empty POST
Returns HTTP 204 No Content
Notes Stops the server first if it active.

 

Shut down a server
POST /servers/SERVER/shutdown
Expects Empty POST
Returns HTTP 204 No Content
Notes Sends the server an ACPI power-down event. Server reverts to a stopped status if it is persistent and is automatically destroyed otherwise.

 

Reset a server
POST /servers/SERVER/reset
Expects Empty POST
Returns HTTP 204 No Content

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk