/job/get


GET https://api.sitehost.nz/1.0/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.0/job/get.json?apikey=your_key_here&job_id=1&type=scheduler", false);

xmlHttp.send();

var response = xmlHttp.responseText;

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,
    "time": 10.88
}