/job/get


GET https://api.sitehost.nz/1.3/job/get.json

Many of our API methods will return a job ID. This method can be used to retrieve information about one of these jobs.

Query Parameters

ParameterTypeRequiredDescription
job_idintegerYesThe ID for the job.Example: 1
typestringYesThe job type. Valid job types are 'daemon' or 'scheduler'.Example: scheduler

Code Samples

JavaScript PHP Rails Python
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.3/job/get.json?apikey=your_key_here&job_id=1&type=scheduler", false);

xmlHttp.send();

var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.3/job/get.json?apikey=your_key_here&job_id=1&type=scheduler");
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/job/get.json?apikey=your_key_here&job_id=1&type=scheduler")
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/job/get.json?apikey=your_key_here&job_id=1&type=scheduler'

response = requests.get(uri)

Response

200:

application/json
{
    "return": {
        "created": "2016-04-15 11:18:29",
        "started": "2016-04-15 11:18:30",
        "completed": "2016-04-15 11:19:21",
        "message": "Server updated successfully",
        "state": "Completed",
        "logs": []
    },
    "msg": "Successful.",
    "status": true
}