Support  |  Contact Us  |  About Us  |  Blog   Questions? Call 888.71.SERVE (73783)

HARDWARE      API      INFRASTRUCTURE      DOCUMENTATION      

 
Hourly Billing
Automated Provisioning
API
Dedicated Servers & Disks


 

               This is a collection of URL's you can use to allocate and manage NewServers resources with any development environment that can open a URL and process XML. All API methods require authentication. Pass your login information using the username and password variables. Some API methods take optional and/or required parameters. Where applicable we have documented those parameters. Remember to convert to UTF-8 and URL encode parameters that take complex strings.If a problem occurs an error element is added to the responses root element with attributes indicating an error code and brief description.

Method Reference

Dedicated Servers
+ addServer
+ cancelServer
+ listPlans
+ listServers
+ getServer
+ rebootServer
 
Disk Imaging
+ createImage
+ writeImage
+ listImages
+ deleteImage
+ wipeServer

Dedicated Disks
+ addDisk
+ cancelDisk
+ wipeDisk
+ enableDiskService
+ disableDiskService
+ grantDiskAccess
+ revokeDiskAccess
+ listDisks

Ip Addresses (Available Soon)
+ listIps
+ assignIp
+ removeIp
+ addIps
 
Load Balancing (Available Soon)
+ addFarm
+ cancelFarm
+ addToFarm
+ removeFromFarm
+ listFarms

createImage - copy server's disk to an image


Parameters Expected:
username - your username
password - your password
serverId - the id of the server to image
name - what to name the new image

Possible Errors:
server_not_found - could not locate the server specified
image_creation_failed - the image creation process failed
authentication_failed - the username or password was invalid
parameter_missing - missing parameter serverId or name

Example Request URL:
https://noc.newservers.com/api/createImage?username=you&password=yourpass&name=yourimagename

Example Response


addServer - order a new dedicated server


Parameters Expected:
username - your username
password - your password
config - the hardware configuration of the server (small, medium, large or jumbo)
os - the operating system installed of the server (CentOS5.4x64 or Win2003x64)
imageName - the name of the image to write to this server
planId - the id of the server plan requested
name - your label for the new servers

Possible Errors:
authentication_failed - the username or password was invalid
parameter_missing - missing parameter planId, config or os
server_limit_exceeded - this account must be verified before adding more servers
server_not_available - no servers available for this plan
credit_card_required - enter credit card info in the webapp
os_invalid - the os requested was invalid
config_invalid - the config requested was invalid
image_not_found - the image requested was not found


Example Request URL:

https://noc.newservers.com/api/addServer?username=you&password=yourpass&config=small&os=centos5.4

Example Response


cancelServer - cancel a server

Parameters Expected:
username - your username
password - your password
serverId - the id of the server to cancel

Possible Errors:
server_not_found - could not locate the server specified
authentication_failed - the username or password was invalid
parameter_missing - missing parameter serverId


Example Request URL:

https://noc.newservers.com/api/cancelServer?username=you&password=yourpass&serverId=1225

Example Response


writeImage - create and image from server

Parameters Expected:
username - your username
password - your password
serverId - the target server id
imageId - the disk image to be written

Possible Errors:
authentication_failed - the username or password was invalid
parameter_missing - missing parameter serverId or imageId
server_not_found - could not locate the server specified
image_not_found - could not locate the image specified
authentication_failed - the username or password was invalid


Example Request URL:

https://noc.newservers.com/api/writeImage?username=you&password=yourpass&serverId=111&imageId=222

Example Response


listImages - list available disk images

Parameters Expected:
username - your username
password - your password

Possible Errors:
authentication_failed - the username or password was invalid


Example Request URL:

https://noc.newservers.com/api/listImages?username=you&password=yourpass

Example Response


deleteImage - delete a disk image

Parameters Expected:
username - your username
password - your password
imageId - the disk image to delete

Possible Errors:
authentication_failed - the username or password was invalid
image_not_found - could not locate the image specified
parameter_missing - missing parameter imageId


Example Request URL:

https://noc.newservers.com/api/deleteImage?username=you&password=yourpass&imageId=11

Example Response


wipeServer - wipe the server's disk

Parameters Expected:
username - your username
password - your password
serverId - the id of the server to wipe

Possible Errors:
authentication_failed - the username or password was invalid
server_not_found - could not locate the server specified
parameter_missing - missing parameter serverId


Example Request URL:
https://noc.newservers.com/api/wipeServer?username=you&password=yourpass&serverId=11

Example Response


listPlans - list dedicated server plans

Parameters Expected:
username - your username
password - your password

Possible Errors:
authentication_failed - the username or password was invalid


Example Request URL:

https://noc.newservers.com/api/listPlans?username=you&password=yourpass

Example Response


listServers - list active servers

Parameters Expected:
username - your username
password - your password

Possible Errors:
authentication_failed - the username or password was invalid


Example Request URL:

https://noc.newservers.com/api/listServers?username=you&password=yourpass

Example Response


getServer - get server info

Parameters Expected:
username - your username
password - your password
serverId - the id of the server to query

Possible Errors:
authentication_failed - the username or password was invalid
server_not_found - could not locate the server specified
parameter_missing - missing parameter serverId


Example Request URL:
https://noc.newservers.com/api/getServer?username=you&password=yourpass&serverId=1225

Example Response


rebootServer - power cycle server

Parameters Expected:
username - your username
password - your password
serverId - the id of the server to reboot

Possible Errors:
authentication_failed - the username or password was invalid
server_not_found - could not locate the server specified
reboot_failed - the power cycle command failed
parameter_missing - missing parameter serverId


Example Request URL:

https://noc.newservers.com/api/rebootServer?username=you&password=yourpass&serverId=1225

Example Response


addDisk - order a new disk

Parameters Expected:
username - your username
password - your password
size - size of the disk (250GB)

Possible Errors:
authentication_failed - the username or password was invalid
disk_limit_exceeded - this account must be verified before adding more disks
disk_not_available - no disk is available for this size
credit_card_required - enter credit card info in the webapp
parameter_missing - missing parameter size
disk_model_invalid - the model was invalid
parameter_missing - missing parameter size


Example Request URL:

https://noc.newservers.com/api/addDisk?username=you&password=yourpass&size=250

Example Response


cancelDisk - cancel a disk

Parameters Expected:
username - your username
password - your password
diskId - the id of the disk to cancel

Possible Errors:
authentication_failed - the username or password was invalid
disk_not_found - could not locate the disk specified
parameter_missing - missing parameter diskId


Example Request URL:

https://noc.newservers.com/api/cancelDisk?username=you&password=yourpass&diskId=111

Example Response


wipeDisk - wipe a disk

Parameters Expected:
username - your username
password - your password
diskId - the id of the disk to wipe

Possible Errors:
authentication_failed - the username or password was invalid
disk_not_found - could not locate the disk specified
parameter_missing - missing parameter diskId


Example Request URL:

https://noc.newservers.com/api/cancelDisk?username=you&password=yourpass&diskId=111

Example Response


enableDiskService - enable a disk service

Parameters Expected:
username - your username
password - your password
diskId - the id of the disk to install a service
service - the name of the service to install (iscsi, nfs, http, ftp)

Possible Errors:
authentication_failed - the username or password was invalid
disk_not_found - could not locate the disk specified
iscsi_exclusive - iscsi cannot be used with other services
parameter_missing - missing parameter service or diskId
service_not_found - could not locate the service specified
iscsi_one_host_only_error - iscsi can only be enabled with one allowed host


Example Request URL:
https://noc.newservers.com/api/enableDiskIscsi?username=you&password=yourpass&diskId=111&service=iscsi

Example Response


disableDiskService - disable a disk service

Parameters Expected:
username - your username
password - your password
diskId - the id of the disk to remove a service
service - the name of the service to remove (iscsi, nfs, http, ftp)

Possible Errors:
authentication_failed - the username or password was invalid
disk_not_found - could not locate the disk specified
parameter_missing - missing parameter diskId or service
service_not_found - could not locate the service specified


Example Request URL:

https://noc.newservers.com/api/disableDiskIscsi?username=you&password=yourpass&diskId=111&service=iscsi

Example Response


grantDiskAccess - allow ip address to access a disk

Parameters Expected:
username - your username
password - your password
diskId - the id of the disk to modify
ipAddress - the ip address to allow

Possible Errors:
authentication_failed - the username or password was invalid
disk_not_found - could not locate the disk specified
invalid_ip_address - the ip address was invalid
mount_point_not_applicable - mount point is only available for nfs
parameter_missing - missing parameter diskId, ipAddress or mountPoint
grant_disk_access_failed - with iSCSI enabled you can only have one ip address with access to the disk


Example Request URL:

https://noc.newservers.com/api/grantDiskAccess?username=you&password=yourpass&diskId=111&address=199.34.120.3&mountPoint=/disk2

Example Response


revokeDiskAccess - deny ip address access to a disk

Parameters Expected:
username - your username
password - your password
diskId - the id of the disk to modify
ipAddress - the ip address to revoke allow

Possible Errors:
authentication_failed - the username or password was invalid
disk_not_found - could not locate the disk specified
ip_address_not_found - could not locate the ip address specified
parameter_missing - missing parameter serverId


Example Request URL:

https://noc.newservers.com/api/revokeDiskAccess?username=you&password=yourpass&diskId=111&address=199.34.120.3

Example Response


listDisks - list active disks

Parameters Expected:
username - your username
password - your password

Possible Errors:
authentication_failed - the username or password was invalid


Example Request URL:

https://noc.newservers.com/api/listDisks?username=you&password=yourpass

Example Response


listIps - list active ip addresses

Parameters Expected:
username - your username
password - your password

Possible Errors:
authentication_failed - the username or password was invalid


Example Request URL:

https://noc.newservers.com/api/listIps?username=you&password=yourpass

Example Response


assignIp - assign ip address to server

Parameters Expected:
username - your username
password - your password
serverId - the id of the server to modify
ipAddress - the address to add to the server

Possible Errors:
authentication_failed - the username or password was invalid
server_not_found - could not locate the server specified
ip_address_not_found - could not locate the ip address specified
parameter_missing - missing parameter serverId or ipAddress


Example Request URL:

https://noc.newservers.com/api/assignIp?username=you&password=yourpass&ipAddress=199.34.120.3&serverId=111

Example Response


removeIp - remove ip address from server

Parameters Expected:
username - your username
password - your password
serverId - the id of the server to modify
ipAddress - the address to remove from the server

Possible Errors:
authentication_failed - the username or password was invalid
server_not_found - could not locate the server specified
ip_address_not_found - could not locate the ip address specified
parameter_missing - missing parameter serverId or ipAddress


Example Request URL:

https://noc.newservers.com/api/removeIp?username=you&password=yourpass&ipAddress=199.34.120.3&serverId=111

Example Response


addIps - order a new ip address allocation

Parameters Expected:
username - your username
password - your password
size - the size of the allocation requested (8,16,32,64,128,256)

Possible Errors:
authentication_failed - the username or password was invalid
allocation_not_available - no allocation is available for this size
parameter_missing - missing parameter size


Example Request URL:
https://noc.newservers.com/api/addIps?username=you&password=yourpass

Example Response


addFarm - order a new farm

Parameters Expected:
username - your username
password - your password
method - the load balancing algorithm to use
service - the port and connection type (http, https, dns, ftp, ntp, pop3, smtp)
name - what to name the new server

Possible Errors:
authentication_failed - the username or password was invalid
method_not_found - could not locate the method specified
service_not_found - could not locate the service specified
parameter_missing - missing parameter method, service or name


Example Request URL:

https://noc.newservers.com/api/addFarm?username=you&password=yourpass&method=roundrobin&name=webfarm&service=http

Example Response


cancelFarm - cancel a farm

Parameters Expected:
username - your username
password - your password
farmId - the id of the farm to cancel

Possible Errors:
authentication_failed - the username or password was invalid
farm_not_found - could not locate the farm specified
parameter_missing - missing parameter farmId


Example Request URL:

https://noc.newservers.com/api/removeFarm?username=you&password=yourpass?farmId=412

Example Response


addToFarm - add a server to a farm

Parameters Expected:
username - your username
password - your password
farmId - the id of the farm to modify
serverId - the id of the server to add to the farm

Possible Errors:
authentication_failed - the username or password was invalid
farm_not_found - could not locate the farm specified
server_not_found - could not locate the server specified
parameter_missing - missing parameter serverId or farmId


Example Request URL:
https://noc.newservers.com/api/addToFarm?username=you&password=yourpass&serverId=111&farmId=412

Example Response


removeFromFarm - remove a server from a farm

Parameters Expected:
username - your username
password - your password
farmId - the id of the farm to modify
serverId - the id of the server to remove from the farm

Possible Errors:
authentication_failed - the username or password was invalid
farm_not_found - could not locate the farm specified
server_not_found - could not locate the server specified
parameter_missing - missing parameter serverId or farmId


Example Request URL:

https://noc.newservers.com/api/removeFromFarm?username=you&password=yourpass&serverId=111&farmId=142

Example Response


listFarms - list active farms

Parameters Expected:
username - your username
password - your password

Possible Errors:
authentication_failed - the username or password was invalid


Example Request URL:
https://noc.newservers.com/api/listFarms?username=you&password=yourpass

Example Response


Copyright © 2009 NewServers, Incorporated. All Rights Reserved.     AUP     |     SLA     |     Terms of Service     |     Privacy Policy     |     Partners     |     Jobs     |     News

Chat Now