/server/list_locations


GET https://api.sitehost.nz/1.3/server/list_locations.json

Lists locations available to provision to.

Query Parameters

ParameterTypeRequiredDescription
client_idintegerYesThe ID for the client.Example: 1

Code Samples

JavaScript PHP Rails Python
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.3/server/list_locations.json?apikey=your_key_here&client_id=1", false);

xmlHttp.send();

var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.3/server/list_locations.json?apikey=your_key_here&client_id=1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
require 'net/http'
require 'uri'

uri = URI.parse("https://api.sitehost.nz/1.3/server/list_locations.json?apikey=your_key_here&client_id=1")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)

response = http.request(request)
import requests

uri = 'https://api.sitehost.nz/1.3/server/list_locations.json?apikey=your_key_here&client_id=1'

response = requests.get(uri)

Response

200:

application/json
{
  "return": [
      {
          "public": "1",
          "os": [
              "Linux"
          ],
          "label": "NZ - Auckland City",
          "code": "AKLCITY",
          "datacenter": "AIR",
          "available_ips": 828,
          "ipv6": true,
          "product_types": {
              "0": "LINVPS",
              "1": "DISK",
              "2": "UPGRAD",
              "3": "CLHOST",
              "4": "CLENT",
              "5": "RESELL",
              "6": "MYHOST",
              "7": "VDSERV",
              "9": "CLDCON",
              "10": "LICENS"
          }
      },
      {
          "public": "1",
          "os": [
              "Linux"
          ],
          "label": "NZ - Auckland's Northshore",
          "code": "AKLNCT",
          "datacenter": "NCT",
          "available_ips": 270,
          "ipv6": true,
          "product_types": {
              "0": "LINVPS",
              "1": "DISK",
              "2": "UPGRAD",
              "3": "CLHOST",
              "4": "CLENT",
              "5": "RESELL",
              "6": "MYHOST",
              "7": "VDSERV",
              "9": "CLDCON",
              "10": "LICENS"
          }
      },
      {
          "public": "1",
          "os": [
              "Linux"
          ],
          "label": "AU - Sydney",
          "code": "LINSYD1",
          "datacenter": "SYD",
          "available_ips": 395,
          "ipv6": true,
          "product_types": [
              "LINVPS",
              "CLHOST",
              "VDSERV",
              "DISK",
              "CLDCON"
          ]
      },
      {
          "public": "1",
          "os": [
              "Windows"
          ],
          "label": "NZ - Auckland City",
          "code": "WINCITY",
          "datacenter": "AIR",
          "available_ips": 149,
          "ipv6": true,
          "product_types": [
              "WINVPS",
              "DISK",
              "UPGRAD",
              "VDSERV"
          ]
      },
      {
          "public": "1",
          "os": [
              "Windows"
          ],
          "label": "NZ - Auckland's Northshore",
          "code": "WINNCT",
          "datacenter": "NCT",
          "available_ips": 263,
          "ipv6": true,
          "product_types": [
              "WINVPS",
              "DISK",
              "UPGRAD",
              "VDSERV"
          ]
      },
      {
          "public": "1",
          "os": [
              "Windows"
          ],
          "label": "AU - Sydney",
          "code": "WINSYD1",
          "datacenter": "SYD",
          "available_ips": 461,
          "ipv6": true,
          "product_types": [
              "WINVPS",
              "VDSERV"
          ]
      }
  ],
  "msg": "Successful",
  "status": true
}