A common get response for Jobs.
JSON Response
{
"list": [{
"attempts": 1,
"command": {
"description": "Create Virtual Server",
"id": 6,
"name": "CreateVirtualServer",
"object": "option"
},
"createdon": 1231007644632,
"currentstate": {
"description": "Change request has succeeded.",
"id": 3,
"name": "Succeeded",
"object": "option"
},
"detail": {
"description": "tests",
"image": "w2k3_64_iis_asp_mssql2k5xp",
"ip": "208.113.76.34",
"name": "test 2",
"type": "virtual_server"
},
"history": [
{
"id": 10242,
"state": {
"description": "Change request is created but not queued yet",
"id": 7,
"name": "Created",
"object": "option"
}
},
{
"id": 10243,
"state": {
"description": "Change request is new to the system.",
"id": 1,
"name": "Queued",
"object": "option"
}
},
{
"id": 10244,
"state": {
"description": "Change request is is transient state...Processing.",
"id": 2,
"name": "Processing",
"object": "option"
}
},
{
"id": 10251,
"state": {
"description": "Change request has succeeded.",
"id": 3,
"name": "Succeeded",
"object": "option"
},
"updatedon": 1231008346317
}
],
"id": 60531,
"lastupdatedon": 1231008346317,
"object": "job",
"objecttype": {
"description": null,
"id": 1,
"name": "VirtualServer",
"object": "option"
},
"owner": "ankit@gogrid.com"
}],
"method": "/grid/job/get",
"status": "success",
"summary": {
"numpages": 0,
"returned": 1,
"start": 0,
"total": 1
}
}
XML Response
<gogrid>
<response method="/grid/job/get" status="success">
<summary total="1" start="0" numpages="0" returned="1"/>
<list>
<object name="job">
<attribute name="id">60531</attribute>
<attribute name="owner">ankit@gogrid.com</attribute>
<attribute name="createdon">1231007644632</attribute>
<attribute name="lastupdatedon">1231008346317</attribute>
<attribute name="attempts">1</attribute>
<attribute name="history"> <list>
<object name="job_history">
<attribute name="id">10242</attribute>
<attribute name="state">
<object name="option">
<attribute name="id">7</attribute>
<attribute name="name">Created</attribute>
<attribute name="description">Change request is created but not queued yet</attribute>
</object>
</attribute>
<attribute name="note"></attribute>
<attribute name="updatedon"></attribute>
</object>
<object name="job_history">
<attribute name="id">10243</attribute>
<attribute name="state">
<object name="option">
<attribute name="id">1</attribute>
<attribute name="name">Queued</attribute>
<attribute name="description">Change request is new to the system.</attribute>
</object>
</attribute>
<attribute name="note"></attribute>
<attribute name="updatedon"></attribute>
</object>
<object name="job_history">
<attribute name="id">10244</attribute>
<attribute name="state">
<object name="option">
<attribute name="id">2</attribute>
<attribute name="name">Processing</attribute>
<attribute name="description">Change request is is transient state...Processing.</attribute>
</object>
</attribute>
<attribute name="note"></attribute>
<attribute name="updatedon"></attribute>
</object>
<object name="job_history">
<attribute name="id">10251</attribute>
<attribute name="state">
<object name="option">
<attribute name="id">3</attribute>
<attribute name="name">Succeeded</attribute>
<attribute name="description">Change request has succeeded.</attribute>
</object>
</attribute>
<attribute name="note"></attribute>
<attribute name="updatedon">1231008346317</attribute>
</object>
</list> </attribute> <attribute name="currentstate">
<object name="option">
<attribute name="id">3</attribute>
<attribute name="name">Succeeded</attribute>
<attribute name="description">Change request has succeeded.</attribute>
</object>
</attribute>
<attribute name="command">
<object name="option">
<attribute name="id">6</attribute>
<attribute name="name">CreateVirtualServer</attribute>
<attribute name="description">Create Virtual Server</attribute>
</object>
</attribute>
<attribute name="objecttype">
<object name="option">
<attribute name="id">1</attribute>
<attribute name="name">VirtualServer</attribute>
<attribute name="description"></attribute>
</object>
</attribute>
<attribute name="detail">{type=virtual_server, description=tests, image=w2k3_64_iis_asp_mssql2k5xp, ip=208.113.76.34, name=test 2}</attribute>
</object>
</list>
</response>
</gogrid>
CSV Response
# SUCCESS, /grid/job/get, TOTAL, 1, NUMPAGES, 0, START, 0, RETURNED, 1
# id,owner,createdon,lastupdatedon,attempts,currentstate.id,currentstate.name,currentstate.description,command.id,command.name,command.description,objecttype.id,objecttype.name,objecttype.description,detail,history.1.id,history.1.state.id,history.1.state.name,history.1.state.description,history.1.note,history.1.updatedon,history.2.id,history.2.state.id,history.2.state.name,history.2.state.description,history.2.note,history.2.updatedon,history.3.id,history.3.state.id,history.3.state.name,history.3.state.description,history.3.note,history.3.updatedon,history.4.id,history.4.state.id,history.4.state.name,history.4.state.description,history.4.note,history.4.updatedon
60531,ankit@gogrid.com,1231007644632,1231008346317,1,3,Succeeded,Change request has succeeded.,6,CreateVirtualServer,Create Virtual Server,1,VirtualServer,,"{""type"":""virtual_server"",""description"":""tests"",""image"":""w2k3_64_iis_asp_mssql2k5xp"",""name"":""test 2"",""ip"":""108.123.72.31""}",10242,7,Created,Change request is created but not queued yet,,,10243,1,Queued,Change request is new to the system.,,,10244,2,Processing,Change request is is transient state...Processing.,,,10251,3,Succeeded,Change request has succeeded.,,1231008346317,
Error Codes
| 400
| IllegalArgumentException
| Any problems with input parameters will generate an IllegalArgumentException.
|
| 401
| Unauthorized
| This error code will occur when the role tied to the API Key in your request has the wrong Access Controls.
|
| 403
| Authentication Failed
| This error code will occur when your request is not properly signed. Make sure your have a valid API key and secret and that you are properly generating a request signature. Ensure that the clock on the computer from which you are making the request is synchronized woth the GoGrid API Server.
|
| 404
| Not Found
| This error will occur if you have specified a method that does not exist or any other URL does not exists on the API Server.
|
| 500
| UnexpectedError
| These types of errors indicate an internal system problem. Depending on the severity of the error and whether not it is blocking your development, report the error to GoGrid support by emailing the response to apisupport@gogrid.com.
|