/server/snapshot/list_all


GET https://api.sitehost.nz/1.1/server/snapshot/list_all.json

Lists all active snapshots for a server

Query Parameters

ParameterTypeRequiredDescription
client_idintegerYesThe ID for the client.Example: 1
namestringYesThe name of the server.Example: servername

Code Samples

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

xmlHttp.send();

var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.1/server/snapshot/list_all.json?apikey=your_key_here&client_id=1&name=servername");
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.1/server/snapshot/list_all.json?apikey=your_key_here&client_id=1&name=servername")
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.1/server/snapshot/list_all.json?apikey=your_key_here&client_id=1&name=servername'

response = requests.get(uri)

Response

200:

application/json
{
  "return": [
    {
      "id": "93",
      "name": "xvda2",
      "device": "servername-disk",
      "mountpoint": "/",
      "size": "16",
      "fstype": "ext4",
      "drbd": "0",
      "parent": "91",
      "pending": "0",
      "created": "2016-09-20 15:38:26",
      "backup": "0",
      "disk_total": "0",
      "disk_used": "0",
      "inodes_total": "0",
      "inodes_used": "0",
      "stats_updated": "0000-00-00 00:00:00",
      "disk_warn": "0",
      "expires": "2016-09-20 16:38:26"
    }
  ],
  "msg": "Successful",
  "status": true,
  "time": 160.59
}