API

grid.image.delete

From GoGrid



Contents

This call will delete a single image from your grid. This method follows a common delete pattern.

Request

URL


Role Based Access Control Permissions

  • Super User
  • System User

Input Request Query Parameters

Required Name Version Type Description
Required api_key 1.0 string An API Key generated by GoGrid.
  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 * 1.3 string The id of the image to delete.
  name * 1.3 string The name of the image to delete.
  image * 1.3 string The id or name of the image to delete.
Optional

* Only one of these parameters id, name, or image is required per delete method call.

Sample Request

To delete by name:

https://api.gogrid.com/api/grid/image/delete
  ?name=GSI-23hUo-985JHD-Jfkn4-Rhkn4
  ... auth parameters...

To delete by id:

https://api.gogrid.com/api/grid/image/delete
  ?id=203923
  ... auth parameters...

Response


A common delete response for Images.

JSON Response

{
    "list": [{
        "billingtokens": [{
            "id": 22,
            "name": "Windows 2008 32bit",
            "price": 0
        }],
        "createdTime": 1248385571829,
        "description": "This is my 2003 Windows Server Image",
        "friendlyName": "Windows 2k3 Image",
        "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": 1250793615820
    }],
    "method": "/grid/image/delete",
    "status": "success",
    "summary": {
        "numpages": 0,
        "returned": 1,
        "start": 0,
        "total": 1
    }
}

XML Response

<gogrid>
  <response method="/grid/image/delete" status="success">
    <summary total="1" start="0" numpages="0" returned="1"/>
    <list>
      <object name="image">
        <attribute name="id">250</attribute>
        <attribute name="friendlyName">Windows 2k3 Image</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">3</attribute>
            <attribute name="name">Deleted</attribute>
            <attribute name="description">Image is marked for deletion in 7 days </attribute>
          </object>
        </attribute>
        <attribute name="description">This is my 2003 Windows Server Image</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">1250793235803</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/delete, 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,Windows 2k3 Image,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,3,Deleted,Image is marked for deletion in 7 days ,This is my 2003 Windows Server Image,19999/GSI-d8fbf7d7-6c0c-47f5-9fb6-9211ed2fe64e.img,0.0,true,false,1248385571829,1250793639445,22,Windows 2008 32bit,0.0,

Error Codes

Status Code Description
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.
Personal tools