Document Version: v1.9.4

VPS.NET RESTful API Documentation

VPS Cloud Sites—Next Generation Web Hosting

This guide outlines the basic principles of using the VPS.NET RESTful API to manage your account and cloud servers. If you have any questions about using this system, please don't hesitate to contact the VPS.NET support team.

This documentation is program language-independent and our examples will use command-line CURL to send the requests to VPS.NET

  1. Authentication
  2. Requesting Data
  3. API Functions:

API Functions: SSD VPS

GET SSD VPS's #

Gets the list of all SSD VPS's on your account.

      [{
        "virtual_machine":
        {
          "running": true,
          "updated_at": "2015-01-15T05:15:02-04:00",
          "power_action_pending": false,
          "system_template_id": 41,
          "id": 1432,
          "cloud_id": 3,
          "domain_name": "demodomain.com",
          "hostname": "web01",
          "consumer_id": 0,
          "backups_enabled": false,
          "password": "a8hjsjnbs91",
          "ssd_vps_label": "SSD Server 01",
          "ssd_plan": "VPS 1GB",
          "created_at": "2015-01-14T03:10:39-04:00",
          "bandwidth_used":8255683
        }
        },
        {
        "virtual_machine":
          {
          "running": true,
          "updated_at": "2015-01-19T06:55:02-04:00",
          "power_action_pending": false,
          "system_template_id": 221,
          "id": 1632,
          "cloud_id": 13,
          "domain_name": "demodomain.com",
          "hostname": "mysql01",
          "consumer_id": 0,
          "backups_enabled": false,
          "password": "dsi8h38hd2s",
          "ssd_vps_label": "SSD Server 02",
          "ssd_plan": "VPS 2GB",
          "created_at": "2015-01-10T08:17:39-04:00",
          "bandwidth_used":2345678
          }
      }]
    

Where:

running
Shows if the machine is booted
power_action_pending
Shows if the machine is currently locked pending a task. Usually implies a reboot/shutdown/startup/resize is in progress.
built
Shows if the machine is built
system_template_id
The ID of the template this machine is based on
cloud_id
The ID of the cloud this machine is located within
backups_enabled
Shows if the backups are enabled
password
The default root password for this machine. The password will be set to this whenever the machine is built.
bandwidth_used
Monthly bandwidth used (in Kilobytes)
ssd_plan
Shows the SSD VPS package name currently on.

Other fields are self-explanatory.

GET properties for a SSD VPS #

See above for example output and field definitions

CREATE SSD VPS #

      {
        "virtual_machine":
          {
            "ssd_vps_plan": "1",
            "fqdn": "ssd.mydomain.net",
            "system_template_id": 29,
            "cloud_id":10,
            "backups_enabled": false,
            "rsync_backups_enabled": false,
            "licenses":
            {
                "12":1,
                "15":0
            }
          }
      }
      
    

Where:

ssd_vps_plan
Required. Select a package/plan for the new SSD server. ( VPS 0.5GB - 0, VPS 1GB - 1, VPS 2GB - 2, VPS 4GB - 3, VPS 8GB - 4, VPS 16GB - 5)
fqdn
Required. The fully qualified domain name for the new host
system_template_id
Required. The ID of the template you will base your machine on
cloud_id
Required. The ID of the cloud you will base your machine on
backups_enabled
Required. Specify if the backups are enabled for this machine
rsync_backups_enabled
Required. Specify if the Rsync Backup are enabled for this machine
licenses
Optional. To purchase control panel or add-on licensing, use the array with license_id:value (1 - purchase license, 0 - cancelling license)

Use Get SSD Clouds to list available SSD clouds

EDIT a SSD VPS #

You can edit SSD server properties.

      {
          "virtual_machine":
            {
              "ssd_vps_plan": "4"
              "backups_enabled": false
            }
      }
    

SHUTDOWN a SSD VPS gracefully #

Run this command on machines which are powered on.

START UP a SSD VPS #

Run this command on machines which are powered off.

REBOOT a SSD VPS gracefully #

Run this command on machines which are powered on.

POWER OFF a SSD VPS forcefully #

Run this command on machines which are powered on.

Rebuild a SSD VPS #

To rebuild a pending SSD server.

Rebuild SSD VPS Network #

Note: Your SSD server will be rebooted and the network interfaces configuration file on this SSD server will be regenerated.

GET rsync backup info of a SSD VPS #

Gets the rsync backup info for a specific SSD server.

{ "username":1000, "quota":"0.00 GB out of 10 GB", "password":"GGD3sH" }

CONVERT SSD VPS backup to a template #

Converts an existing backup to a template.

RESTORE SSD VPS backup #

Restores an existing backup.

GET bandwidth utilisation for SSD VPS #

You may pass 'from' and 'to' with timestamps as params to get usage data during a specific timespan.

GET CPU utilisation for SSD VPS #

You may pass 'from' and 'to' with timestamps as params to get usage data during a specific timespan.

Re-install a SSD VPS #

{"virtual_machine": {"system_template_id": 132} }

Reset root password for SSD VPS #

SSD server will be rebooted in order to reset the password.

Deploy all storage for SSD VPS #

Note: Upgrading your storage will cause downtime on your SSD Server.

DELETE a SSD VPS #

This will put the SSD server on a recoverable state for 12 hours since the time SSD server was deleted.

Options

"{'reassign_ip':'1234', 'alternate_vps':'1221'}"

Pro-Active Managed Service cannot be transfered to a Windows server.

Clone a SSD VPS #

      
        {
          "cloud_id": 12,
          "one_click": true,
          "one_clone": true       
        }
      
    

Where:

cloud_id
Required. The ID of the cloud you will base your clone machine on
one_click
Required.
one_clone
Required.

Note: Your SSD server will be cloned in the same cloud unless you pass cloud_id.