Documentation

Document Version: v1.9.5

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:

Authentication

To authenticate to the API, use your email address and generated API key.

To generate a key:

  1. Log into your account at VPS.net portal.
  2. Click the Profile link at the top of the page.
  3. On the page that appears, click the Generate link next to the API key field.

If you are developing a web-based application, please be sure to store the credentials safely outside the document root and be cautious about checking them into any source control system you may be using.

Send the credentials using HTTP Basic authentication with every request you make to the API. All API sessions are stateless.

Requesting Data

To request data, you need to send the appropriate HTTP headers along with your authentication credentials to the following URL:

curl -H 'Accept: application/json' -H 'Content-type: application/json' -u dave@vps.net:abc123ABC456== https://api.vps.net/virtual_machines.api10json

Where:

.api10json
The only version available at the moment. Suffix all requests with this extension.
dave@vps.net:abc123ABC456==
The example credentials. Replace with your own authentication details.

API Functions: Cloud Servers NodesIPsBackupsCloudsDNSSupport TicketsTemplatesInvoicesProfile

GET Cloud Servers #

Gets the list of all cloud servers on your account.

	  [{
			  "virtual_machine":
				{
				  "running": true,
				  "updated_at": "2009-05-15T06:55:02-04:00",
				  "power_action_pending": false,
				  "system_template_id": 41,
				  "id": 1384,
				  "cloud_id": 3,
				  "domain_name": "demodomain.com",
				  "hostname": "web01",
				  "consumer_id": 0,
				  "backups_enabled": false,
				  "password": "a8hjsjnbs91",
				  "label": "Web Server 01",
				  "slices_count": null,
				  "created_at": "2009-04-16T08:17:39-04:00",
				  "bandwidth_used":8255683,
				  "delayed_storage":true,
				  "delayed_storage_until":"2010-05-01T10:00:00-04:00"
				}
			  },
			  {
				"virtual_machine":
				  {
					"running": true,
					"updated_at": "2009-05-15T06:55:02-04:00",
					"power_action_pending": false,
					"system_template_id": 41,
					"id": 1385,
					"cloud_id": 3,
					"domain_name": "demodomain.com",
					"hostname": "mysql01",
					"consumer_id": 0,
					"backups_enabled": false,
					"password": "dsi8h38hd2s",
					"label": "MySQL Server 01",
					"slices_count": null,
					"created_at": "2009-04-16T08:17:39-04:00",
					"bandwidth_used":2345678,
					"delayed_storage":false,
                                        "delayed_storage_until":null
				  }
				}]
	

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)
delayed_storage
Shows if the cloud server is set to delay the storage.
delayed_storage_until
The datetime when the delayed storage will be synced with the cloud server.

Other fields are self-explanatory.

Note: You can pass basic=true parameter to skip some attributes(bandwidth_used, running) to get faster response.

GET properties for a Cloud Server #

See above for example output and field definitions

Search Cloud Servers #

Search param can be IP address, hostname, domain name, vm label or tag.

CREATE Cloud Servers #

	  {
		"virtual_machine":
		  {
			"label": "My Cloud Server",
			"fqdn": "myvps.mydomain.net",
			"system_template_id": 9,
                        "cloud_id":1,
                        "backups_enabled": false,
                        "rsync_backups_enabled": false,
                        "r1_soft_backups_enabled": false,
			"slices_required": 4,
			"server_monitoring_service_required": "1",
			"server_monitoring_configuration_service_required": "1"
		  }
	  }

To purchase control panel or add-on licensing for your cloud server, add a licenses array into virtual_machine array(see code sample below), use the array with license_id:value (1 - purchase license, 0 - cancelling license). Use Get Cloud Server Licenses call to get license ids.

Note: You can only purchase one control panel license (e.g. cPanel or ISPmanager). To purchase Control Panel Add-ons, buy the control panel first.

	  {
		  "virtual_machine":
			{
			  "backups_enabled": false,
        "rsync_backups_enabled": false,
        "r1_soft_backups_enabled": false,
			  "label": "D Tester",
			  "slices_required": 3,
        "licenses":
        	{
             "2":1,
             "1":0
          }
			}
	  }

Where:

label
Required. A label for the new Cloud Server. This can be any string for your reference. No special characters allowed.
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
r1_soft_backups_enabled
Optional. Specify if the R1Soft Backup are enabled for this machine
server_monitoring_service_required
Optional. Specify if the Server Montoring Service are enabled for this machine
server_monitoring_configuration_service_required
Optional. Specify if the Server Montoring & Configuration Service are enabled for this machine

CREATE Instant Cloud Servers #

	  {
		"instant":true
		"country":1 
	  }

Where:

country
Required. Location of the cloud server.(UK - 1, US - 2)

SHUTDOWN a Cloud Server gracefully #

Run this command on machines which are powered on.

REBOOT a Cloud Server gracefully #

Run this command on machines which are powered on.

START UP a Cloud Server #

Run this command on machines which are powered off.

POWER OFF a cloud server forcefully #

Run this command on machines which are powered on.

Rebuild a cloud server #

To rebuild a pending cloud server.

Rebuild cloud server Network #

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

EDIT a cloud server #

You can edit cloud server properties including node allocations.

To edit a cloud server (e.g. change the consumer_id for it), you should use the HTTP PUT method to deliver a JSON object. On every request, this must include the number of nodes required (field: slices_required).

	  {
		  "virtual_machine":
			{
			  "backups_enabled": false,
			  "consumer_id": 1,
			  "label": "D Tester",
			  "slices_required": 3
			}
	  }

Where:

public_fqdn
Optional. For changing the hostname of this machine

You can set the amount of daily nodes instead of regular, as well as storage nodes:

Bandwidth Nodes are available only on selected clouds. Use GET properties for a Cloud call to get a list of such clouds.

	  {
		  "virtual_machine":
			{
			  "backups_enabled": true,
			  "consumer_id": 118,
			  "label": "Daily node tester",
			  "daily_nodes_required": 2,
                          "storage_nodes_required": 1,
                          "ram_nodes_required": 1,
                          "bandwidth_nodes_required": 1,
			}
	  }

You can upgrade slices for an existing cloud server but defer the disk resize to an optional date:

	  {
		  "virtual_machine":
			{
			  "slices_required": 3,
			  "delayed_storage": true,
			  "delayed_storage_until": "2010-04-24 14:00"
			}
	  }

Note: The datetime for delayed_storage_until should be in Eastern Time (US & Canada) timezone.

To edit a licenses on your cloud server, use the HTTP PUT method to deliver a JSON object. On every request, this must include the number of nodes required (field: slices_required) and licenses array with license id and value (1 - purchase license, 0 - cancelling license). Use Get Cloud Server Licenses call to get license ids.

Mind that you can only purchase one control panel license (e.g.: cPanel or ISPmanager), if you want to purchase another one, you have to delete existing control panel license first. If you delete control panel license, do not forget to delete all Control Panel Add-ons licenses either.

	  {
		  "virtual_machine":
			{
			  "backups_enabled": false,
			  "label": "D Tester",
			  "slices_required": 3,
                          "licenses":
                          	{
                                   "2":1,
                                   "1":0
                                }
			}
	  }

GET rsync backup info of a cloud server #

Gets the rsync backup info for a specific cloud server.

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

CONVERT cloud servers backup to a template #

Converts an existing backup to a template.

Create Template in one step. #

{ "one_click":true }

RESTORE cloud server #

Restores an existing backup.

GET bandwidth utilisation for a cloud server #

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

GET CPU utilisation for a cloud server #

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

Add dotDefender License for a cloud server #

{"accept": '1', "virtual_machine_id": 1385}

Remove dotDefender License from a Cloud Server #

Re-install a Cloud Server #

{"virtual_machine": {"system_template_id": 92} }

Reset root password for a Cloud Server #

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

Deploy all storage for a Cloud Server #

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

DELETE a Cloud Server #

This will put the cloud server on a recoverable state for 12 hours since the time cloud server was deleted. You may recover the cloud server using recover vps API method.

Options

"{'reassign_ip':'1234', 'alternate_vps':'1221'}"
  • reassign_ip: Transfer primary IP address of the cloud server to another cloud server on the same cloud. Specify ID of cloud server to transfer to. Please note that the IP address will be added as an additional IP address and is chargeable.
  • alternate_vps: Transfer the Pro-Active Managed Service service on this cloud server to another.
  • Pro-Active Managed Service service cannot be transfered to a Windows cloud server.

    GET Recoverable Cloud Servers #

    RECOVER a Cloud Server #

    Get Activity Log of Cloud Server #

    Available Cloud Server Licenses #

    Get Cloud Server Licenses #

    API Functions: Nodes Cloud ServersIPsBackupsCloudsDNSSupport TicketsTemplatesInvoicesProfile

    GET Nodes #

    Gets the list of nodes.

    When regular monthly nodes are returned, this will include a daily_node param which denotes if the slice is a daily billed slice.

    To filter by consumer_id:

     https://api.vps.net/nodes.api10json?type={ram|storage|fusion|vps|bandwidth}&consumer_id={CONSUMER_ID}

    CREATE Nodes #

    To create a node:

    {"quantity": 1}

    To create a RAM node:

    {"quantity": 1, "upgrade_option": "ram"}

    To create 2 storage nodes:

    {"quantity": 2, "upgrade_option": "storage"}

    To create 3 daily nodes:

    {"quantity": 3, "upgrade_option": "daily"}

    To create 2 bandwidth nodes:

    {"quantity": 2, "upgrade_option": "bandwidth"}

    Mind that Paypal based accounts are not compatible with this API function

    Pro-rated payment for additional nodes will be taken immediately, and nodes will be billed monthly (or daily for daily nodes) until removed from the account.

    EDIT Nodes #

    Edit node properties.

    	  {"consumer_id": 99}

    Currently only consumer_id can be edited.

    To update a regular monthly node:

     https://api.vps.net/nodes/{ID}.api10json

    To update a RAM node:

     https://api.vps.net/nodes/{ID}/update_ram_node.api10json

    To update a storage node:

     https://api.vps.net/nodes/{ID}/update_storage_node.api10json

    To update a fusion node:

     https://api.vps.net/nodes/{ID}/update_fusion_node.api10json

    To update a Bandwidth node:

     https://api.vps.net/nodes/{ID}/update_bandwidth_node.api10json

    DELETE Nodes #

    To delete a regular monthly node:

     https://api.vps.net/nodes/{ID}.api10json

    To delete a RAM node:

     https://api.vps.net/nodes/{ID}/remove_ram_node.api10json

    To delete a storage node:

     https://api.vps.net/nodes/{ID}/remove_storage_node.api10json

    To delete a fusion node:

     https://api.vps.net/nodes/{ID}/remove_fusion_node.api10json

    To delete a Bandwidth node:

     https://api.vps.net/nodes/{ID}/remove_bandwidth_node.api10json

    This will remove the node from your account. Once removed, it will no longer be billed, and cannot be used. You can delete nodes only if they are not assigned to a cloud server.

    API Functions: IPs CloudsCloud ServersNodesBackupsDNSSupport TicketsTemplatesInvoicesProfile

    GET IPs #

    Gets the list of your IP addresses

    ADD IPs #

    Adds IP addresses.

    	  {"quantity": 1, "type": "internal", "virtual_machine_id": 99, "consumer_id": 58}

    Note: If a consumer_id is set on an IP address, note that the IP will only work on Cloud Servers with the matching consumer_id.

    Edit IPs  #

    Set or edit description / consumer_id for each IP addresses.

    	  {"ip_address":{"notes": "description", "consumer_id": 58}}

    Request for Justified IPs #

    Request for adding justified Ip Address.

    "{'virtual_machine_id': 99 , 'ip_justification' : {'ip_address1':{'justification_type' : '0', 'justification_reason': 'test.com' },{'ip_address2':{'justification_type' : '1', 'justification_reason': 'test' }}}"

    Where:

    justify_as
    Justification Type (dns - 0, ns - 1, ssl - 3, others - 2)

    GET justification list #

    Gets the list of your Justified IP addresses list

    DELETE IPs #

    This will remove the IP from your account. Once removed, it will no longer be billed, and cannot be used.

    Reassign IPs #

    Reassign an IP address to the cloud server of your choice. Please note IPs can only be reassigned to a cloud server on the same cloud.

    "{'virtual_machine_id':'12345'}"

    IP address exists #

    	  {"ip_address": "68.169.23.153"}

    API Functions: Backups CloudsCloud ServersNodesIPsDNSSupport TicketsTemplatesInvoicesProfile

    BACK UP cloud servers #

    GET backup list of cloud servers #

    Gets the full list of all backups for a specific cloud server.

    	  [
    		{
    		  "built_at": "2011-01-07T15:44:43Z",
    		  "disk_id": 765,
    		  "operating_system_distro": "ubuntu",
    		  "created_at": "2011-01-07T20:43:33+05:30",
    		  "template_id": 7,
    		  "operating_system": "linux",
    		  "allowed_swap": true,
    		  "updated_at": "2011-01-07T21:14:43+05:30",
    		  "backup_type": "normal",
    		  "allow_resize_without_reboot": false,
    		  "id": 3774, "backup_size": "510340",
    		  "min_disk_size": 5,
    		  "identifier": "zvgrwpkoi16qfq",
    		  "built": true,
    		  "locked":false
    		}]
    	

    Where:

    built_at
    The date time at which the backup was built completely.
    disk_id
    This is used internally and should be ignored.
    template_id
    This is used internally and should be ignored.
    backup_type
    Defines which type of backup this is. normal represents a user-created backup and autobackup represents a scheduled automatic backup.
    min_disk_size
    Specifies the minimum disk size required on a cloud server to restore this backup.
    identifier
    This is used internally and should be ignored.
    built
    Specifies if the backup has been completely built.
    locked
    Specifies if the backup is active and available for use.

    Delete Backup #

    Delete a virtual machine backup.

    Note: Only manual backups can be deleted.

    GET clone list of cloud servers #

    Gets the full list of all the cloning activity of a Cloud Server.

    	  [
    	    {"clone":
    		  {
    		    "label": "test_clone_machine",
    		    "id": 86,
    		    "status": "Cloned successfully",
    		    "created_at": "2014-03-10T18:23:10+05:30",
    		    "cloned_server_id": 2978
    		  }
    		}]
    	

    Clone a cloud server #

    	  
    	    {
    	      "cloud_id": 15,
    	      "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 cloud server will be cloned in the same cloud unless you pass cloud_id.

    Delete Clone #

    Delete a clone.

    	  
    	    {
    	      "id": 543,
    	    }
    	  
    	

    Where:

    id
    Required. The ID of the clone which is to be delete.

    API Functions: Clouds Cloud ServersNodesIPsBackupsDNSSupport TicketsTemplatesInvoicesProfile

    GET Clouds #

    Gets the list of available clouds

    	  [
    		{
          "cloud":
          {
            "label": "test cloud",
            "available": true,
            "system_templates": [
              { 
                "label": "Ubuntu 8.04 x64",
                "id": 78 
              },
              { 
                "label": "Ubuntu 10.04 x64",
                "id": 92 
              }],
            "fusion_io": false,
            "id": 153,
            "cloud_version": 1,
            "premium_price": 0,
            "currency_code": "USD"
            "daily_node_bandwidth": 100,
            "monthly_node_bandwidth": 150
          }
    		}]
    	

    Note: Bandwidth per node value will return in GB.

    GET SSD Clouds #

    Gets the list of available SSD clouds

    	  [
    		{
          "cloud":
          {
            "label": "test SSD cloud",
            "available": true,
            "system_templates": [
              { 
                "label": "Ubuntu 8.04 x64",
                "id": 78 
              },
              { 
                "label": "Ubuntu 10.04 x64",
                "id": 92 
              }],
            "id": 160,
            "cloud_version": 1,
            "premium_price": 0,
            "currency_code": "USD"
            "daily_node_bandwidth": 100,
            "monthly_node_bandwidth": 150
          }
    		}]
    	

    Use Create SSD VPS to create a new SSD VPS.

    GET properties for a Cloud #

    	{
               "label":"Test Cloud",
               "available":true,
               "system_templates":
                [{
                   "label":"Ubuntu 8.04 x64",
                   "id":78
                 },
                 {
                   "label":"10.04 (Lucid) x64",
                   "id":87
                 }],
                 "cluster_stats":
                 {
                    "stats":
                    {
                        "memory":
                        {
                            "usage":"3488",
                            "total":"4094",
                            "free":"606"
                        },
                        "tasks":
                        {
                            "pending":"3"
                        },
                        "templates":
                        {
                            "system":"72",
                            "custom":"148"
                        },
                        "disk_space":
                        {
                            "usage":"150.0",
                            "total":"232.0",
                            "free":"82.0"
                        }
                    }
                 },
               "fusion_io":false,
               "id":3,
               "cloud_version":1
            }
            

    GET Cloud Groups #

    Gets the list of available cloud groups

    API Functions: DNS Cloud ServersNodesIPsBackupsCloudsSupport TicketsTemplatesInvoicesProfile

    GET Domains #

    Gets the list of all domains on your account.

    	[{
    		"domain":
    			{
    			  "name": "demodomain.com",
    			  "updated_at": "2009-05-15T06:55:02-04:00",
    			  "id": 51,
    			  "created_at": "2009-05-15T06:55:02-04:00"
    			}
    	},
    	{
    		"domain":
    			{
                              "name": "demodomain2.com",
    			  "updated_at": "2009-05-15T06:55:02-04:00",
    			  "id": 52,
    			  "created_at": "2009-05-15T06:55:02-04:00"
    			}
    	}]
    	

    CREATE Domain #

    	  {
    		"domain":
    		  {
    			"name": "demodomain.com",
    			"custom_template": "",
    			"ip_address": "127.0.0.1"
    		  }
    	  }

    Where:

    name
    Required. The fully qualified domain name for the new domain
    custom_template
    Required. The ID of the DNS template you will base your domain on or an empty value
    ip_address
    Required. The IP address for the initial records

    GET properties for a Domain #

    	{
    		"domain":
    			{
    			  "name": "demodomain.com",
    			  "updated_at": "2009-05-15T06:55:02-04:00",
    			  "id": 51,
    			  "serial": "2010080405",
    			  "created_at": "2009-05-15T06:55:02-04:00"
    			}
    	}
            

    DELETE a Domain #

    GET Domain Records #

    Gets the list of the all records of your domain.

            [{
    		"domain_record":
    			{
    			  "ttl": 86400,
    			  "type": "a",
    			  "id": 2315958,
    			  "host": "www",
    			  "data": "127.0.0.1"
    			}
    	},
    	{
    		"domain_record":
    			{
                              "ttl": 300,
    			  "type": "failover",
    			  "id": 2315959,
    			  "host": "@",
    			  "data": ["127.0.0.1", "127.0.0.2", "127.0.0.3"]
    			}
    	}]
    	

    Where:

    ttl
    Unsigned time in seconds
    type
    Type of the record: soa, ns, a, aaaa, mx, txt, cname, failover
    host
    Name of the node pertaining to this record
    data
    Data of type-specific relevance, such as the IP address for address records, or the priority and hostname for MX records.

    CREATE Domain Record #

    For NS, A, AAAA, MX, TXT, CNAME record type

    	  {
    		"domain_record":
    		  {
    			"ttl": 86400,
    			"data": "dns1.vps.net."
                            "type": "ns",
                            "host": "@"
    		  }
    	  }

    Where:

    ttl
    Required. Unsigned time in seconds (900 - 15 Minutes, 3600 - 1 Hour, 86400 - 1 Day, 604800 - 1 Week)
    type
    Required. Type of the record
    host
    Required. Name of the node pertaining to this record
    data
    Required. Data of type-specific relevance, such as the IP address for address records, or the priority and hostname for MX records.
    mx_priority
    Required for MX records.

    For SRV record type

    	  {
    		"domain_record":
    		  {
    			"ttl": "86400",
    			"data": "test.example.com",
    			"type": "srv",
    			"host": "_sip._tcp.example.com",
    			"service": "testservice",
    			"protocol": "_udp",
    			"priority": "10",
    			"weight": "60",
    			"port": "5060"
    		  }
    	  }

    Where:

    ttl
    Required. Unsigned time in seconds (900 - 15 Minutes, 3600 - 1 Hour, 86400 - 1 Day, 604800 - 1 Week)
    type
    Required. Type of the record
    host
    Required. Name of the node pertaining to this record
    data
    Required. The canonical hostname of the machine providing the service, ending in a dot.
    priority
    Required. The priority of the target host, lower value means more preferred
    service
    Required. The symbolic name of the desired service.
    protocol
    Required. The transport protocol of the desired service.("_tcp" = "TCP", "_udp" = "UDP", "_tls" = "TLS")
    weight
    Required. A relative weight for records with the same priority, higher value means more preferred.
    port
    Required. The TCP or UDP port on which the service is to be found.

    For FAILOVER record type

    	  {
    		"domain_record":
    		  {
    			"data": ["127.0.0.2", "127.0.0.3"],
                            "type": "failover",
                            "host": "www",
                            "primary_data": "64.152.33.1",
                            "service_type": "icmp.ping"
    		  }
    	  }

    Where:

    type
    Required. Type of the record
    host
    Required. Name of the node pertaining to this record
    primary_data
    Required. Primary IP of the record
    data
    Required. The array of IPs (Secondary failover targets).
    service_type
    Required. The textkey that specifies the service type, as listed in GET Service Type Textkeys call.

    EDIT Domain Record #

    	  {
    		"domain_record":
    		  {
    			"ttl": 86400,
    			"data": "127.0.0.1"
    		  }
    	  }

    UPDATE Domain Records #

            {
              "domain_records":
              [
                  {
                      "domain_record":
                      {
                          "ttl":86400,
                          "type":"soa",
                          "host":"@",
                          "data":"dns1.vps.net."
                      }
                  },
                  {
                      "domain_record":
                      {
                          "ttl":86400,
                          "type":"ns",
                          "host":"@",
                          "data":"dns1.vps.net."
                      }
                  },
                  {
                      "domain_record":
                      {
                          "ttl":86400,
                          "type":"ns",
                          "host":"@",
                          "data":"dns2.vps.net."
                      }
                  },
                  {
                      "domain_record":
                      {
                          "ttl":86400,
                          "mx_priority":10,
                          "type":"mx",
                          "host":"@",
                          "data":"mail.domain.com."
                      }
                  },
                  {
                      "domain_record":
                      {
                          "ttl":86400,
                          "type":"a",
                          "host":"@",
                          "data":"127.0.0.1"
                      }
                  },
                  {
                      "domain_record":
                      {
                          "ttl":86400,
                          "type":"a",
                          "host":"www",
                          "data":"127.0.0.1"
                      }
                  }
            ]}
    	

    GET properties for a Domain Record #

    See above for example output and field definitions

    DELETE a Domain Record #

    GET Service Type Textkeys #

    Gets the list of Service Type Textkeys

    GET DNS Hosts #

    Gets the list of ips and hosts of vps.net NS records

            [{
                      "host": "dns1.vps.net",
                      "ip":"67.228.254.4"
             },
             {
                      "host":"dns2.vps.net",
                      "ip":"67.228.255.5"
    	}]
    	

    GET DNS Templates #

    	[{
    		"dns_template":
    			{
    			  "template_name": "demotemplate1",
    			  "updated_at": "2009-05-15T06:55:02-04:00",
    			  "id": 51,
    			  "created_at": "2009-05-15T06:55:02-04:00"
    			}
    	},
    	{
    		"dns_template":
    			{
                              "template_name": "demotemplate2",
    			  "updated_at": "2009-05-15T06:55:02-04:00",
    			  "id": 52,
    			  "created_at": "2009-05-15T06:55:02-04:00"
    			}
    	}]
    	

    CREATE DNS Template #

    	  {
                    "dns_template":
                        {
                            "template_name": "demotemplate",
                        }
    	  }

    GET DNS Template Records #

    Gets the list of the all records of your dns template.

    CREATE DNS Template Record #

    	  {
                    "dns_template_record":
                        {
                            "dns_template_id": 55,
                            "ttl": 86400,
                            "type": "ns",
                            "host":"@",
                            "data": "dns1.vps.net."
                        }
    	  }

    Where:

    ttl
    Required. Unsigned time in seconds (900 - 15 Minutes, 3600 - 1 Hour, 86400 - 1 Day, 604800 - 1 Week)
    type
    Required. Type of the record
    host
    Required. Name of the node pertaining to this record
    data
    Required. Data of type-specific relevance, such as [!ip] for address records, or the priority and [!domain] for MX records.
    mx_priority
    Required for MX records.

    EDIT DNS Template Record #

    	  {
                    "dns_template_record":
                        {
                            "target": "127.0.0.5",
                            "ttl":900
                        }
    	  }

    DELETE a DNS Template Record #

    DELETE a DNS Template #

    API Functions: Support Tickets Cloud ServersNodesIPsBackupsCloudsDNSTemplatesInvoicesProfile

    GET Tickets #

    Gets the list of tickets.

    	[{
            "ticket":
            {
               "status": "Open",
               "department": "Billing",
               "id": "979",
               "subject": "API test subject"
               "last_responded": "Staff Followup",
               "last_response_time": "2010-08-09T08:02:00-04:00"
             }
            }]
    	

    Where:

    status
    Shows the status of the ticket
    department
    Shows the issue demands 'General', Billing, Basic or Pro-Active Managed Service

    Other fields are self-explanatory.

    To filter by ticket status:

     https://api.vps.net/tickets.api10json?status={open|closed|hold}

    To filter by status and department:

     https://api.vps.net/tickets.api10json?status={open|closed|hold}&department={DEPARTMENT_ID}

    Departments Ids:

    Billing - 1, Sales - 2, Wordpress - 3, Cloud Hosting -4, Server issue - 5, Other - 6

    Techinical Issue Subject Type

    Server is Down - "reboot"
    Server Performance Issue - "performance_issue"
    Installation Request - "installation"
    Server Administration Request - "administration"
    Assisted Start-up Request - "assisted"
    Abuse / DDoS - "abuse"
    Unknown / Other - "other"

    Open Support Tickets #

    To create a issue that demands 'Sales' or 'Billing' or 'Other'

    	  {
                "department": "1",
                "body": "This is a test body",
    	  }
      

    Where:

    department
    Required. Specify the issue demands to which department (See above for Department IDs)
    Body
    Required. Body of the ticket

    Department id should be '3' or '4' for wordpress/CH. Change here

        {
                "department": "3",
                "body": "This is a test body",
                "domain_name" : "www.test.com"
        }
      

    Where:

    department
    Required. Specify the issue demands to which department (See above for Department IDs)
    Body
    Required. Body of the ticket
    domain_name
    Optional. Domain name of Cloudhosting account, not required for wordpress hosting

    To Open a ticket for Tech issue

    	  {
                "subject": "reboot",
                "body": "This is a test body",
                "department": "5"
                "vm_id": 520,
                "root_password": "F4334Y!",
                'ssh_port": "345",
                "ssh_user": "test",
                "ssh_password": "df345dd"
    	  }

    Where:

    department
    Required. Specify the issue demands to which department (See above for Department IDs)
    Body
    Required. Body of the ticket
    subject
    Required. Specify the subject that related to your server, If you can't find the appropriate subject choose other option.(See above for subjects)
    vm_id
    Required. Specify the ID of the Cloud Server. which you have issue.

    Optional. Specify the IP Address, root password, SSH Port, SSH User, and password for this SSH User

    Note: If one of our techs asks you for your root or application password, please use these parameters to send it via a secure way.

    GET properties for a ticket #

    	  {
                  "replies":[{
                  "client_response": true,
                  "comment": "Test ticket comment",
                  "time": "2010-08-06T08:28:16-04:00"
                  }],
                  "subject": "Test Subject"
                  "status": "Open"
    	  }

    Where:

    comment
    Shows the response comments.
    time
    Shows date and time of the reponse.
    client_response
    Denotes if the response was from the client. Returns false otherwise.

    Respond to an Open Ticket #

    	  {
                "body": "This is a test reply body",
                "root_password": "Ffe33D"
    	  }

    Where:

    body
    Required. Reply body of the open ticket
    root_password
    Optional. Specify the Root password of your Cloud Server.

    Close a Ticket #

    This will close the ticket.

    GET Pro-Active Managed Services list #

    Gets the list of Pro-Active Managed Services.

    	{
              "managed_services":
              [{
                "virtual_machine_id": 520,
                "managed_support_ip": "68.169.47.56",
                "renewal_date": "11 Sep 2010"
              }]
           }
        

    API Functions: Templates Cloud ServersNodesIPsBackupsCloudsDNSSupport TicketsInvoicesProfile

    GET Custom Templates #

    Gets the list of custom templates.

    	[{
                "system_template":
                {
                  "label": "test_cus_temp",
                  "operating_system": "Custom Templates",
                  "id": 115,
                  "description": "test_cus_temp"
                }
            }]
        

    EDIT a Custom Template #

    Edit custom template properties.

    	[{
                "system_template":
                {
                  "operating_system" : "Custom Template"
                  "description": "test_cus_temp"
                  "info": "This is a test info"
                }
            }]
        

    Delete a Custom Template #

    This will remove the custom template straight away.

    GET Templates #

    Gets the list of available templates.

    	[{
                "template_groups": [
                {
                  "name": "CentOS 5.5 x64",
                  "templates": [
                  {
                    "clouds": [
                    {
                      "id": 1
                      "system_template_id": 123
                    },
                    {
                      "id": 2
                      "system_template_id": 234
                    }
                   ],
                   "name": "CentOS 5.5 x64 LAMP"
                   },
                   {
                     "clouds": [
                     {
                       "id": 3,
                       "system_template_id": 436
                     },
                     {
                       "id": 4,
                       "system_template_id": 516
                     }
                    ],
                    "name": "CentOS 5.5 x64 MySQL"
                    }
                  ]
                }]
            }]
        

    GET properties for a System Template #

     	  {"system_template":
                {
                  "label":"Windows Server 2008 x86 - Enterprise",
                  "os_type":"Windows",
                  "operating_system":"Windows",
                  "windows_license_version":"Enterprise",
                  "commercial":false,
                  "applicable_price":{"USD":20.0,"GBP":15},
                  "info":"Windows Server 2008 x86 - Enterprise",
                  "id":1899,
                  "description":"Windows Server 2008 x86 - Enterprise"
                }
              }
        

    Please note that some templates like CloudLinux templates and Windows templates are chargeable. You should check for "applicable_price" parameter in this API call result to check if a particular template is chargeable.

    GET CloudLinux Templates #

    Gets the list of CloudLinux templates.

    	[{
                "commercial_template":
                 {
                    "system_template_id":106,
                    "id":25,
                    "virtual_machine_id":null
                 }
               },
               {
                 "commercial_template":
                 {
                    "system_template_id":107,
                    "id":27,
                    "virtual_machine_id":null
                 }
            }]
        

    Add a CloudLinux Template #

    	  {
    		"commercial_template":
    		  {
    			"confirm_purchase": "1",
    			"system_template_id": "106",
    		  }
    	  }
        

    EDIT a CloudLinux Template #

    	  {
    		"commercial_template":
    		  {
    			"confirm_purchase": "1",
    			"system_template_id": "107"
    		  }
    	  }
        

    DELETE a CloudLinux Template #

    GET Windows Templates #

    Gets the list of Windows templates.

    	[{
                "windows_template":
                 {
                    "system_template_id":10,
                    "id":15,
                    "virtual_machine_id":null
                 }
               },
               {
                 "windows_template":
                 {
                    "system_template_id":17,
                    "id":20,
                    "virtual_machine_id":null
                 }
            }]
        

    Add a Windows Template #

    	  {
    		"windows_template":
    		  {
    			"confirm_purchase": "1",
    			"system_template_id": "11",
    		  }
    	  }
        

    EDIT a Windows Template #

    	  {
    		"windows_template":
    		  {
    			"confirm_purchase": "1",
    			"system_template_id": "12"
    		  }
    	  }
        

    DELETE a Windows Template #

    API Functions: Invoices Cloud ServersNodesIPsBackupsCloudsDNSSupport TicketsTemplatesProfile

    GET Invoices #

    Gets the list of invoices.

            [{
                "invoice":
                {
                  "date_sent":"2011-04-27T07:09:19-04:00",
                  "date_due":"2011-04-30T19:00:00-04:00",
                  "amount":"15.00",
                  "currency":"USD",
                  "status":"paid",
                  "invoice_no":"9130"
                }
            }]
        

    GET Billing Info #

    Gets the current balance and account credits.

            {
                  "current_balance":99.0,
                  "currency":"USD",
                  "account_credits":0
            }
        

    GET Invoice #

    Get an Invoice in PDF format.

    curl -C - -O -u dave@vps.net:abc123ABC456== -L https://api.vps.net/invoices/12345.pdf

    API Functions: Profile Cloud ServersNodesIPsBackupsCloudsDNSSupport TicketsTemplatesInvoices

    GET Profile Info #

    Get user's profile information.