/server/list_images
GET https://api.sitehost.nz/1.3/server/list_images.json
Lists images available to provision.
Query Parameters
Parameter | Type | Required | Description |
filters[type] | string | Show only images of a specific type.Example: distro | |
filters[os] | string | Show only images of a specific operating system. | |
filters[include_disabled] | string | Include images that are currently disabled. | |
filters[location] | string | Show only images available at a specific location. | |
filters[sort_by] | string | The field name to sort the results by. | |
filters[sort_dir] | string | The direction to sort in. Valid options are ASC and DESC | |
filters[page_size] | integer | The number of items to return per page. | |
filters[page_number] | integer | The page number to return. |
Code Samples
JavaScript PHP Rails Pythonvar xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.3/server/list_images.json?apikey=your_key_here&filters[type]=distro", false);
xmlHttp.send();
var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.3/server/list_images.json?apikey=your_key_here&filters[type]=distro");
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_images.json?apikey=your_key_here&filters[type]=distro")
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_images.json?apikey=your_key_here&filters[type]=distro'
response = requests.get(uri)
Response
200:application/json
{
"return": [
{
"code": "win2012.amd64",
"name": "Windows Server 2012 R2",
"arch": "amd64",
"os": "windows",
"distro": "win2012",
"type": "distro"
},
{
"code": "win2012.ss12.express.amd64",
"name": "Windows Server 2012 w/ SQL Server 2012 Express",
"arch": "amd64",
"os": "windows",
"distro": "win2012.ss12.express",
"type": "distro"
},
{
"code": "win2008",
"name": "Windows Server 2008 R2",
"arch": "amd64",
"os": "windows",
"distro": "win2008",
"type": "distro"
},
{
"code": "ubuntu-utopic.amd64",
"name": "Ubuntu 14.10 (Utopic)",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-utopic",
"type": "distro"
},
{
"code": "ubuntu-xenial.amd64",
"name": "Ubuntu 16.04 (Xenial)",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-xenial",
"type": "distro"
},
{
"code": "ubuntu-trusty.amd64",
"name": "Ubuntu 14.04.1 LTS (Trusty)",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-trusty",
"type": "distro"
},
{
"code": "ubuntu-saucy.amd64",
"name": "Ubuntu 13.10 (Saucy)",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-saucy",
"type": "distro"
},
{
"code": "ubuntu-raring.amd64",
"name": "Ubuntu 13.04 (Raring)",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-raring",
"type": "distro"
},
{
"code": "ubuntu-precise.amd64",
"name": "Ubuntu 12.04 LTS (Precise) - Recommended by SiteHost",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-precise",
"type": "distro"
},
{
"code": "debian-wheezy.amd64",
"name": "Debian 7.0 (Wheezy)",
"arch": "amd64",
"os": "linux",
"distro": "debian-wheezy",
"type": "distro"
},
{
"code": "debian-jessie.amd64",
"name": "Debian 8.0 (Jessie)",
"arch": "amd64",
"os": "linux",
"distro": "debian-jessie",
"type": "distro"
},
{
"code": "centos-7.amd64",
"name": "CentOS 7",
"arch": "amd64",
"os": "linux",
"distro": "centos-7",
"type": "distro"
},
{
"code": "centos-6.6.amd64",
"name": "CentOS 6.6",
"arch": "amd64",
"os": "linux",
"distro": "centos-6.6",
"type": "distro"
},
{
"code": "centos-6.3.amd64",
"name": "CentOS 6.3",
"arch": "amd64",
"os": "linux",
"distro": "centos-6.3",
"type": "distro"
},
{
"code": "coreos.amd64",
"name": "CoreOS Stable",
"arch": "amd64",
"os": "linux",
"distro": "coreos",
"type": "distro"
},
{
"code": "ubuntu-lucid.amd64",
"name": "Ubuntu 10.04 LTS (Lucid)",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-lucid",
"type": "distro"
}
],
"msg": "Successful",
"status": true
}
"return": [
{
"code": "win2012.amd64",
"name": "Windows Server 2012 R2",
"arch": "amd64",
"os": "windows",
"distro": "win2012",
"type": "distro"
},
{
"code": "win2012.ss12.express.amd64",
"name": "Windows Server 2012 w/ SQL Server 2012 Express",
"arch": "amd64",
"os": "windows",
"distro": "win2012.ss12.express",
"type": "distro"
},
{
"code": "win2008",
"name": "Windows Server 2008 R2",
"arch": "amd64",
"os": "windows",
"distro": "win2008",
"type": "distro"
},
{
"code": "ubuntu-utopic.amd64",
"name": "Ubuntu 14.10 (Utopic)",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-utopic",
"type": "distro"
},
{
"code": "ubuntu-xenial.amd64",
"name": "Ubuntu 16.04 (Xenial)",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-xenial",
"type": "distro"
},
{
"code": "ubuntu-trusty.amd64",
"name": "Ubuntu 14.04.1 LTS (Trusty)",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-trusty",
"type": "distro"
},
{
"code": "ubuntu-saucy.amd64",
"name": "Ubuntu 13.10 (Saucy)",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-saucy",
"type": "distro"
},
{
"code": "ubuntu-raring.amd64",
"name": "Ubuntu 13.04 (Raring)",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-raring",
"type": "distro"
},
{
"code": "ubuntu-precise.amd64",
"name": "Ubuntu 12.04 LTS (Precise) - Recommended by SiteHost",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-precise",
"type": "distro"
},
{
"code": "debian-wheezy.amd64",
"name": "Debian 7.0 (Wheezy)",
"arch": "amd64",
"os": "linux",
"distro": "debian-wheezy",
"type": "distro"
},
{
"code": "debian-jessie.amd64",
"name": "Debian 8.0 (Jessie)",
"arch": "amd64",
"os": "linux",
"distro": "debian-jessie",
"type": "distro"
},
{
"code": "centos-7.amd64",
"name": "CentOS 7",
"arch": "amd64",
"os": "linux",
"distro": "centos-7",
"type": "distro"
},
{
"code": "centos-6.6.amd64",
"name": "CentOS 6.6",
"arch": "amd64",
"os": "linux",
"distro": "centos-6.6",
"type": "distro"
},
{
"code": "centos-6.3.amd64",
"name": "CentOS 6.3",
"arch": "amd64",
"os": "linux",
"distro": "centos-6.3",
"type": "distro"
},
{
"code": "coreos.amd64",
"name": "CoreOS Stable",
"arch": "amd64",
"os": "linux",
"distro": "coreos",
"type": "distro"
},
{
"code": "ubuntu-lucid.amd64",
"name": "Ubuntu 10.04 LTS (Lucid)",
"arch": "amd64",
"os": "linux",
"distro": "ubuntu-lucid",
"type": "distro"
}
],
"msg": "Successful",
"status": true
}