Device - Endpoints

DELETE
/v2/device/console
Console
Reset Out of Band Console
Request URL
/v2/device/console
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
Example Response

                      
Example Code
Sample code coming shortly.

/v2/example/device/console/delete.php
                      
GET
/v2/device/console/{service}
Console
Launch Out of Band Console
Request URL
/v2/device/console/{service}
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
Example Response
Dedicated Example
{
	success: true,
	results: 1,
	result: "BASE64_ENCODED_STRING"
}

** Convert BASE64_DECODE(result) to {filename}.jnlp **

VPS Example
{
	success: true,
	results: 4,
	-result: {
		user: "USERNAME",
		pass: "PASSWORD",
		host: "HOSTNAME",
		port: "PORT_NUMBER"
	}
}
                      
Example Code

<?php

require('api.class.php');

$device = new api("YOUR_API_KEY");

$var->post->service    "SERVICE_ID"

$device $this->api->call("v2""device""console""get"$var);

?>
GET
/v2/device/power/{service}
Power Status
Get the current power status.
Request URL
/v2/device/power/{service}
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
Example Response
{
	success: true,
	results: 1,
	result: "on"
}
                      
Example Code

<?php

require('api.class.php');

$device = new api("YOUR_API_KEY");

$var->post->service    "SERVICE_ID"

$device $this->api->call("v2""device""power""get"$var);

?>
POST
/v2/device/power
Power Action
Specify requested power action
Request URL
/v2/device/power
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
  • @param {action} (enum) REQUIRED Action to execute
    • on
    • off
    • reboot
    • cycle
Example Response
{
	success: true,
	results: 1,
	result: "Chassis Power Control: Up\/On"
}
                      
Example Code

<?php

require('api.class.php');

$device = new api("YOUR_API_KEY");

$var->post->service    "SERVICE_ID"
$var->post->action     "REQUEST_ACTION";

$device $this->api->call("v2""device""power""post"$var);

?>
PUT
/v2/device/power
Set Custom Boot Order
Execute Power request for specific one boot order. *Note this does require a call to POST /v2/device/power to execute
Request URL
/v2/device/power
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
  • @param {request} (enum) REQUIRED Boot to Custom
    • pxe
    • cdrom
    • bios
Example Response
{
	success: true,
	results: 1,
	result: "Set Boot Device to pxe"
}
                      
Example Code

<?php

require('api.class.php');

$device = new api("YOUR_API_KEY");

$var->post->service    "SERVICE_ID"
$var->post->request    "REQUEST_ACTION"

$device $this->api->call("v2""device""power""put"$var);

?>
GET
/v2/device/iso
ISO Images
Return ISO Image List
Request URL
/v2/device/iso
Parameters
  • @param {service} (int) Optional Service ID
      Required Regex Validation
    • [0-9]
Example Response
{
	success: true,
	results: 39,
	-result: [
		-{
			name: "CentOS 6 x86",
			value: "CentOS-6-x86"
		},
		-{
			name: "CentOS 6 x86_64",
			value: "CentOS-6-x86_64"
		},
		-{
			name: "CentOS 7 x86_64",
			value: "CentOS-7-x86_64"
		},
		-{
			name: "Debian 6 x86",
			value: "Debian-6-x86"
		},
		-{
			name: "Debian 6 x86_64",
			value: "Debian-6-x86_64"
		},
		-{
			name: "Debian 7 x86",
			value: "Debian-7-x86"
		},
		-{
			name: "Debian 7 x86_64",
			value: "Debian-7-x86_64"
		},
	]
}
                      
Example Code

<?php

require('api.class.php');

$device = new api("YOUR_API_KEY");

$device $this->api->call("v2""device""iso""get""");

?>
POST
/v2/device/iso
Upload ISO
Specify the ISO Image to utilize
Request URL
/v2/device/iso
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
  • @param {image} (string) REQUIRED ISO Image Name
      Valid Entry from function:
    • GET: /v2/device/iso
Example Response
{
	success: true,
	results: 1,
	result: "Image Uploaded to Controller"
}
                      
Example Code

<?php

require('api.class.php');

$device = new api("YOUR_API_KEY");

$var->post->service    "SERVICE_ID"
$var->post->image      "ISO_IMAGE_VALUE"

$device $this->api->call("v2""device""console""post"$var);

?>
POST
/v2/device/password
Reset Password
Reset Password
Request URL
/v2/device/password
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
Example Response
{
	success: true,
	results: 1,
	result: ""
}
                      
Example Code
Sample code coming shortly.

/v2/example/device/password/post.php
                      
PUT
/v2/device/iso
Mount ISO
Mount ISO Image to Device
Request URL
/v2/device/iso
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
Example Response
{
	success: true,
	results: 1,
	result: "Image Mounted"
}
                      
Example Code

<?php

require('api.class.php');

$device = new api("YOUR_API_KEY");

$var->post->service    "SERVICE_ID"

$device $this->api->call("v2""device""iso""put"$var);

?>
DELETE
/v2/device/iso
Unmount ISO
Unmount ISO Image from Device
Request URL
/v2/device/iso
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
Example Response
{
	success: true,
	results: 1,
	result: "Image UnMounted"
}
                      
Example Code

<?php

require('api.class.php');

$device = new api("YOUR_API_KEY");

$var->post->service    "SERVICE_ID"

$device $this->api->call("v2""device""iso""delete"$var);

?>
GET
/v2/device/reload/{service}
List Operating Systems
Return list of available Operating Systems.
Request URL
/v2/device/reload/{service}
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
Example Response
{
	success: true,
	results: 39,
	-result: [
		-{
			name: "CentOS 6 x86",
			value: "CentOS-6-x86"
		},
		-{
			name: "CentOS 6 x86_64",
			value: "CentOS-6-x86_64"
		},
		-{
			name: "CentOS 7 x86_64",
			value: "CentOS-7-x86_64"
		},
		-{
			name: "Debian 6 x86",
			value: "Debian-6-x86"
		},
		-{
			name: "Debian 6 x86_64",
			value: "Debian-6-x86_64"
		},
		-{
			name: "Debian 7 x86",
			value: "Debian-7-x86"
		},
		-{
			name: "Debian 7 x86_64",
			value: "Debian-7-x86_64"
		},
	]
}
                      
Example Code

<?php

require('api.class.php');

$device = new api("YOUR_API_KEY");

$var->post->service    "SERVICE_ID"

$device $this->api->call("v2""device""reload""get"$var);

?>
GET
/v2/device/list
Device List
List devices
Request URL
/v2/device/list
Parameters
  • @param {type} (enum) Optional Optional Service Type Filter
    • cloud
    • dedicated
    • vps
  • @param {service} (int) Optional Optional Service ID
Example Response
{
	success: true,
	results: 1,
	result: ""
}
                      
Example Code
Sample code coming shortly.

/v2/example/device/get.php
                      
POST
/v2/device/hostname
Update Hostname
Update Hostname
Request URL
/v2/device/hostname
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
  • @param {hostname} (string) REQUIRED Hostname
      Required Regex Validation
    • ^(?:[a-zA-Z0-9]+(?:\-*[a-zA-Z0-9])*\.)+[a-zA-Z]{2,6}$
Example Response
{
	success: true,
	results: 1,
	result: ""
}
                      
Example Code
Sample code coming shortly.

/v2/example/device/hostname/post.php
                      
POST
/v2/device/reload
Start Reload
Start Operating System Reload
Request URL
/v2/device/reload
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
  • @param {value} (string) REQUIRED Template Value Name of the desired Operating System
      Valid Entry from function:
    • GET: /v2/device/reload
Example Response
{
	success: true,
	results: 1,
	result: "RANDOMLY_GENERATED_ROOT_PASSWORD"
}
                      
Example Code

<?php

require('api.class.php');

$device = new api("YOUR_API_KEY");

$var->post->service    "SERVICE_ID"
$var->post->value      "TEMPLATE_VALUE"

$device $this->api->call("v2""device""reload""post"$var);

?>
DELETE
/v2/device/reload
Cancel Reload
Cancel Reload in progress.
Request URL
/v2/device/reload
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
Example Response
{
	success: true,
	results: 1,
	result: "Request Cancelled"
}
                      
Example Code

<?php

require('api.class.php');

$device = new api("YOUR_API_KEY");

$var->post->service    "SERVICE_ID"

$device $this->api->call("v2""device""reload""delete"$var);

?>
GET
/v2/device/stats/{service}
Device Stats
Display Device Statistics
Request URL
/v2/device/stats/{service}
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
  • @param {start} (int) Optional Start timestamp
      Required Regex Validation
    • [0-9]
  • @param {stop} (int) Optional Stop timestamp
      Required Regex Validation
    • [0-9]
Example Response
VPS Return
{
	success: true,
	results: 7,
	-result: {
	node: "NODE_NAME",
	status: "Online",
	type: "VPS_TYPE",
	memory: "33.28 \/ 512.00",
	harddisk: "0.50 \/ 80.00",
	bandwidth: "0.00 \/ 2000.00",
	-ipaddr: [
		"198.98.112.103",
		"198.71.82.56",
		"198.71.82.57",
		"2605:f700:c0:1::c9f2:2482",
		"2605:f700:c0:1::c804:9ef1",
		"2605:f700:c0:1::dfa1:5a09"
		]
	}
}
Dedicated Return
{
	success: true,
	results: 3,
	-result: {
		success: true,
		results: 1,
		-result: {
			-SWITCH_NAME: {
				-4: {
				name: "PORT_ALIAS",
				-data: {
					inbits_last: "8233",
					outbits_last: "28888",
					inbits_avg: "6112",
					outbits_avg: "12287",
					inbytes: "2040274584",
					outbytes: "4101140903",
					totalbytes: "6141415487",
					95pct: "50736"
				},
				graph: "BASE64_ENCODED_STRING"
				},
				-28: {
				name: "PORT_ALIAS",
				-data: {
					inbits_last: "8233",
					outbits_last: "28888",
					inbits_avg: "6112",
					outbits_avg: "12287",
					inbytes: "2040274584",
					outbytes: "4101140903",
					totalbytes: "6141415487",
					95pct: "50736"
				},
				graph: "BASE64_ENCODED_STRING"
				}
			}
		}
	}
}
                      
Example Code


                      
PUT
/v2/device/reload
Reload Status
Dedicated Only - Return status of reload
Request URL
/v2/device/reload
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
Example Response
{
	success: true,
	results: 1,
	result: "Request Cancelled"
}
                      
Example Code
Sample code coming shortly.

/v2/example/device/reload/put.php
                      
GET
/v2/device/hardware/{service}
Hardware Config
Display Hardware Configuration
Request URL
/v2/device/hardware/{service}
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
Example Response
VPS Return

Dedicated Return
{
"success": true,
"results": 2,
"result": {
	"parts": {
		"CPU": [
			"Intel Xeon E3-1230v3"
		],
		"Motherboard": [
			"Supermicro - X10SLE-F"
		],
		"RAM": [
			"8 GB - ECC Buffered RAM",
			"8 GB - ECC Buffered RAM"
		],
		"Hard Drive": [
			"1 TB - WD RE4"
		],
		"Network Card": [
			"10\/100\/1000 Network Card",
			"10\/100\/1000 Network Card",
			"10\/100 Network Card"
		]
		},
		"ports": {
			"DC08R28SW03": {
				"GigabitEthernet1-28": {
					"ifAdminStatus": "Up",
					"ifOperStatus": "Up",
					"ifSpeed": "100 Mbps"
				},
				"GigabitEthernet1-4": {
					"ifAdminStatus": "Up",
					"ifOperStatus": "Up",
					"ifSpeed": "100 Mbps"
				}
			}
		}
	}
}
                      
Example Code

hardware info
                      
GET
/v2/device/type/{service}
Device Type
Return the device type
Request URL
/v2/device/type/{service}
Parameters
  • @param {service} (int) REQUIRED Service ID
      Required Regex Validation
    • [0-9]
Example Response

                      
Example Code
Sample code coming shortly.

/v2/example/device/type/get.php