URL
Role Based Access Control Permissions
Input Request Query Parameters
|
| sig
| 1.0
| string
| An MD5 Signature that signs each and every API request. Instructions on how to generate this signature can be found here.
|
|
| v
| 1.0
| string
| The version of the API. For more information, see API Versions.
- For version 1.3, set parameter to 1.3
|
|
| id n *
| 1.3
| string
| The id(s) of the image(s) to retrieve. If multiple input id parameters are specified, the API will retrieve the set of images whose ids match the input parameter values.
|
|
| name n *
| 1.3
| string
| The name(s) of the image(s) to retrieve. If multiple input name parameters are specified, the API will retrieve the set of images whose names match the input parameter values.
|
|
| image n *
| 1.3
| string
| The id(s) or name(s) of the of the image(s) to retrieve. If multiple input image parameters are specified, the API will retrieve the set of images whose id(s) or name(s) match the input parameter values.
|
n You can have multiple parameters to retrieve multiple images by id, name, or image in one API call.
* Only one of these parameters id, name, or image is required per get method call. These parameters are exclusive and cannot be mixed in a call.
Sample Request
To get by name:
https://api.gogrid.com/api/grid/image/get
?name=GSI-kdf39-khdf94-JHfk3
... auth parameters...
To get by id:
https://api.gogrid.com/api/grid/image/get
?id=19283
... auth parameters...
To get multiple images by id:
https://api.gogrid.com/api/grid/image/get
?image=65413
&image=32165
&image=45672
&image=35168
... auth parameters...
A common get response for Images.
JSON Response
{
"list": [{
"billingtokens": [{
"id": 22,
"name": "Windows 2008 32bit",
"price": 0
}],
"createdTime": 1248385571829,
"friendlyName": "n",
"id": 250,
"isActive": true,
"isPublic": false,
"location": "19999/GSI-d8fbf7d7-6c0c-47f5-9fb6-9211ed2fe64e.img",
"name": "GSI-d8fbf7d7-6c0c-47f5-9fb6-9211ed2fe64e",
"object": "image",
"os": {
"description": "Windows 2008 Server (32-bit)",
"id": 11,
"name": "Windows 2008 Server (32-bit)",
"object": "option"
},
"owner": {
"id": 19999,
"name": "Servepath",
"object": "customer"
},
"price": 0,
"state": {
"description": "Image is available for adds",
"id": 2,
"name": "Available",
"object": "option"
},
"type": {
"description": "Web or Application Server",
"id": 1,
"name": "Web Server",
"object": "option"
},
"updatedTime": 1248386268435
}],
"method": "/grid/image/get",
"status": "success",
"summary": {
"numpages": 0,
"returned": 1,
"start": 0,
"total": 1
}
}
XML Response
<gogrid>
<response method="/grid/image/get" status="success">
<summary total="1" start="0" numpages="0" returned="1"/>
<list>
<object name="image">
<attribute name="id">250</attribute>
<attribute name="friendlyName">n</attribute>
<attribute name="name">GSI-d8fbf7d7-6c0c-47f5-9fb6-9211ed2fe64e</attribute>
<attribute name="os">
<object name="option">
<attribute name="id">11</attribute>
<attribute name="name">Windows 2008 Server (32-bit)</attribute>
<attribute name="description">Windows 2008 Server (32-bit)</attribute>
</object>
</attribute>
<attribute name="owner">
<object name="customer">
<attribute name="id">19999</attribute>
<attribute name="name">Servepath</attribute>
</object>
</attribute>
<attribute name="type">
<object name="option">
<attribute name="id">1</attribute>
<attribute name="name">Web Server</attribute>
<attribute name="description">Web or Application Server</attribute>
</object>
</attribute>
<attribute name="state">
<object name="option">
<attribute name="id">2</attribute>
<attribute name="name">Available</attribute>
<attribute name="description">Image is available for adds</attribute>
</object>
</attribute>
<attribute name="description"></attribute>
<attribute name="location">19999/GSI-d8fbf7d7-6c0c-47f5-9fb6-9211ed2fe64e.img</attribute>
<attribute name="price">0.0</attribute>
<attribute name="isActive">true</attribute>
<attribute name="isPublic">false</attribute>
<attribute name="createdTime">1248385571829</attribute>
<attribute name="updatedTime">1248386268435</attribute>
<attribute name="billingtokens"> <list>
<object name="billingtoken">
<attribute name="id">22</attribute>
<attribute name="name">Windows 2008 32bit</attribute>
<attribute name="price">0.0</attribute>
</object>
</list> </attribute> </object>
</list>
</response>
</gogrid>
CSV Response
# SUCCESS, /grid/image/get, TOTAL, 1, NUMPAGES, 0, START, 0, RETURNED, 1
# server.id,server.name,id,friendlyName,name,os.id,os.name,os.description,architecture.id,architecture.name,architecture.description,owner.id,owner.name,type.id,type.name,type.description,state.id,state.name,state.description,description,location,price,isActive,isPublic,createdTime,updatedTime,billingtokens.1.id,billingtokens.1.name,billingtokens.1.price
,,250,n,GSI-d8fbf7d7-6c0c-47f5-9fb6-9211ed2fe64e,11,Windows 2008 Server (32-bit),Windows 2008 Server (32-bit),,,,19999,Servepath,1,Web Server,Web or Application Server,2,Available,Image is available for adds,,19999/GSI-d8fbf7d7-6c0c-47f5-9fb6-9211ed2fe64e.img,0.0,true,false,1248385571829,1248386268435,22,Windows 2008 32bit,0.0,
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.
|