Previous(Anatomy of a GoGrid API Call)
Next (Language Support)

GoGrid List API Call Pattern

List Request

A list method call returns a list of objects. A list call will return the entire set of objects in the system. Pagination and sorting is not implemented by default and is therefore not common to all list methods. Different list methods may have query parameters that filter the list, but this mechanism is not generic nor applicable to all list methods.


Some example list methods are:

List Query Parameters

Optional num_items 1.0 int The number of items to return. Specifying this value will effectively paginate the results of a list call into a number of pages with this number of items per page. This makes it easier and faster to access large lists. If not specified, the result will not be paginated.

List Response

A list response will contain the response status, request method, summary of the list, and the list of returned objects.

The summary object contains the following three values:

  • total - the total number of objects in the list
  • numpages - the total number of pages available given the current num_items value
  • start - the current start index for this list of objects
  • returned - the number of objects returned in this list


JSON

The JSON list response is a JSON map. The map contains four key value pairs: status, method, summary and list. The status response is either success or failure. The method lists the api method called. The summary value is a map with the total, start, and returned values. The list value is a JSON array of the returned objects. Each map in the list array is an object.


A sample JSON response is shown below:

{"list":[{"object":"option","description":"Server with 512MB RAM","name":"512MB","id":1},{"object":"option","description":"Server with 1GB RAM","name":"1GB","id":2},{"object":"option","description":"Server with 2GB RAM","name":"2GB","id":3}],"summary":{"total":3,"start":0,"returned":3},"status":"success","method":"/common/lookup/list"}

XML

A successful XML response will return the summary object as an element along with the list of objects in a generic object markup. Each <object> element is an object.


A sample XML response is shown below:

<gogrid>
  <response method="/common/lookup/list" status="success">
    <summary total="3" start="0" returned="3"/>
    <list>
      <object name="option">
        <attribute name="id">1</attribute>
        <attribute name="name">512MB</attribute>
        <attribute name="description">Server with 512MB RAM</attribute>
      </object>
      <object name="option">
        <attribute name="id">2</attribute>
        <attribute name="name">1GB</attribute>
        <attribute name="description">Server with 1GB RAM</attribute>
      </object>
      <object name="option">
        <attribute name="id">3</attribute>
        <attribute name="name">2GB</attribute>
        <attribute name="description">Server with 2GB RAM</attribute>
      </object>
    </list>
  </response>
</gogrid>

CSV

A CSV list response will always start with two rows that are not objects. These non-data rows begin with a # (pound/number) symbol. Subsequent rows each represent a data object. The first row contains summary data. The second row identifies the attribute IDs for the data rows. The remaining rows represent data objects.


A sample CSV response is shown below:

# SUCCESS, /common/lookup/list, TOTAL, 3, START, 0, RETURNED, 3
# id,name,description
1,512MB,Server with 512MB RAM
2,1GB,Server with 1GB RAM
3,2GB,Server with 2GB RAM


GoGrid Get API Call Pattern

Get Request

A get method call is intended to retrieve one or many objects. It is distinct from list, in that you explicitly specify the objects you want retrieved. It returns a list of one to many objects. This call can be ambiguous though, so it may return more objects if queried by name if the name is non-unique. Get calls can query by id or by name. While id is a unique attribute, name is not. If there happens to be another object with the same name attribute, the call will return all objects that match by name per name query value. Querying by ID is guaranteed to return only one object per ID query value (if an object with that ID exists in your system).


Some example get methods are:

Get Query Parameters

Get API methods require one of the following three query parameters, id or name or <object type> (this is the object type and will be load balancer or server for grid.loadbalancer.get and grid.server.get respectively).

  • Using the id parameter will retrieve the object based on the ID attribute.
  • Using the name parameter will retrieve the object based on the name attribute. Note that there is a 20-character length limit on name values.
  • Using the <object type> parameter will retrieve the object based on the ID or name attribute.


If all three parameters are used, the order of precedence is id, name, then <object type>.


Querying by id with one input parameter value is the only way to ensure you will retrieve only one object.


Required id n * string The id(s) of the object(s) to retrieve. If multiple input id parameters are specified, the API will retrieve the set of object whose ids match the input parameter values.
name n * string The name(s) of the object(s) to retrieve. If multiple input name parameters are specified, the API will retrieve the set of servers whose names match the input parameter values.
  • NOTE: Using this parameter may return n or more objects per input parameter value if there is a non-unique name.

n You can have multiple parameters to retrieve multiple objects by id, name, or <object type> in one API call.

* Only one of these parameters id, name, or <object type> is required per get method call.


Get Response

The get response is similar to a list call. A get response will contain the response status, request method, summary of the list and the list of returned objects.


The summary object contains the following three values:

  • total - The total number of objects in the list.
  • start - The current start index for this list of objects. This will always be 0.
  • returned - The number of objects returned in this list. This will always equal to total.

JSON

The JSON get response is a JSON map, { }. The map contains four key value pairs: status, method, summary and list. The status response is either success or failure. The method lists the api method called. The summary value is a map with the total, start, and returned values. The list value is a JSON array of the returned objects. Each map, { }, in the list array is an object.


A sample JSON response is below:

{"list":[{"object":"server","type":{"object":"option","description":"This server has a public connection to the Internet.","name":"Web Server","id":1},"os":{"object":"option","description":"CentOS Linux 4.4 (32-bit)","name":"CentOS 4.4 (32-bit)","id":5},"description":"testingserver1","image":{"object":"option","description":"CentOS 4.4 (32-bit) w/ Apache 2.2 + PHP5","name":"centos44_32_apache22php5","id":1},"state":{"object":"option","description":"Server is in active state.","name":"Started","id":1},"ram":{"object":"option","description":"Server with 2GB RAM","name":"2GB","id":3},"name":"server1","ip":{"object":"ip","public":true,"subnet":"208.113.77.0/255.255.255.240","ip":"208.113.77.5","id":335974},"id":67}],"summary":{"total":1,"start":0,"returned":1},"status":"success","method":"/grid/server/get"}

XML

A successful XML response will return the summary object as an element along with the list of objects in a generic object markup. Each <object> element is an object.


A sample XML response is below:

<gogrid>
  <response method="/grid/server/get" status="success">
    <summary total="1" start="0" returned="1"/>
    <list>
      <object name="server">
        <attribute name="id">2112</attribute>
        <attribute name="name">API Server</attribute>
        <attribute name="description">GoGrid API Server</attribute>
        <attribute name="ip">
          <object name="ip">
            <attribute name="id">335972</attribute>
            <attribute name="ip">208.113.77.3</attribute>
            <attribute name="subnet">208.113.77.0/255.255.255.240</attribute>
            <attribute name="public">true</attribute>
          </object>
        </attribute>
        <attribute name="ram">
          <object name="option">
            <attribute name="id">2</attribute>
            <attribute name="name">1GB</attribute>
            <attribute name="description">Server with 1GB RAM</attribute>
          </object>
        </attribute>
        <attribute name="image">
          <object name="serverimage">
            <attribute name="id">1</attribute>
            <attribute name="name">centos44_32_apache22php5</attribute>
            <attribute name="description">CentOS 4.4 (32-bit) w/ Apache 2.2 + PHP5</attribute>
          </object>
        </attribute>
        <attribute name="state">
          <object name="option">
            <attribute name="id">3</attribute>
            <attribute name="name">Off</attribute>
            <attribute name="description"></attribute>
          </object>
        </attribute>
        <attribute name="type">
          <object name="option">
            <attribute name="id">1</attribute>
            <attribute name="name">Web Server</attribute>
            <attribute name="description">This server has a public connection to the Internet.</attribute>
          </object>
        </attribute>
        <attribute name="os">
          <object name="option">
            <attribute name="id">5</attribute>
            <attribute name="name">CentOS 4.4 (32-bit)</attribute>
            <attribute name="description">CentOS Linux 4.4 (32-bit)</attribute>
          </object>
        </attribute>
      </object>
    </list>
  </response>
</gogrid>

CSV

A CSV list response will always start with 2 rows that are not objects. These non-data rows begin with a #, or pound/number symbol. Subsequent rows each represent a data object. The first row contains summary data. The second row identifies the attribute ids for the data rows. The remaining rows represent data objects.


A sample CSV response is below:

# SUCCESS, /grid/server/list, TOTAL, 1, START, 0, RETURNED, 1
# id,name,description,ip.id,ip.ip,ip.subnet,ip.public,ram.id,ram.name,ram.description,image.id,image.name,image.friendlyName,image.description,image.location,image.isActive,image.isPublic,image.createdTime,image.updatedTime,state.id,state.name,state.description,type.id,type.name,type.description,os.id,os.name,os.description
40,API Server,GoGrid API Server,335972,208.113.77.3,208.113.77.0/255.255.255.240,true,2,1GB,Server with 1GB RAM,1,centos44_32_apache22php5,,CentOS 4.4 (32-bit) w/ Apache 2.2 + PHP5,,,,,,1,Started,Server is in active state.,1,Web Server,This server has a public connection to the Internet.,5,CentOS 4.4 (32-bit),CentOS Linux 4.4 (32-bit)


GoGrid Add API Call Pattern

Add Request

An add method call adds an object into the system.


Some example add methods are:


Add Query Parameters

All objects have different query parameters. The only parameters common to all objects are mandatory name and optional description parameters. id is an auto-generated object.

Required name string The name of this added object. This name can be used in future get and delete calls.

Add Response

An add response will contain the response status, request method, summary of the list, and a list with the added object.


The summary object contains the following three values:

  • total - the total number of objects in the list
  • start - the current start index for this list of objects; will always be 0
  • returned - the number of objects returned in this list; will always equal to total


64-warn.gif
NOTE: The following objects when you add them will not have an id set in the response. The id will be populated once the objects have been successfully provisioned. The API calls and objects with this behavior are:



JSON

The JSON add response is a JSON map, { }. The map contains four key value pairs: status, method, summary and list. The status response is either success or failure. The method lists the api method called. The summary value is a map with the total, start, and returned values. The list value is a JSON array of the added object. The map, { }, in the list array is the added object.


A sample JSON response is below:

{"list":[{"object":"server","type":{"object":"option","description":"This server has a public connection to the Internet.","name":"Web Server","id":1},"os":{"object":"option","description":"CentOS Linux 4.4 (32-bit)","name":"CentOS 4.4 (32-bit)","id":5},"description":"testingserver1","image":{"object":"option","description":"CentOS 4.4 (32-bit) w/ Apache 2.2 + PHP5","name":"centos44_32_apache22php5","id":1},"state":{"object":"option","description":"Server is in active state.","name":"Started","id":1},"ram":{"object":"option","description":"Server with 2GB RAM","name":"2GB","id":3},"name":"server1","ip":{"object":"ip","public":true,"subnet":"208.113.77.0/255.255.255.240","ip":"208.113.77.5","id":335974}}],"summary":{"total":1,"start":0,"returned":1},"status":"success","method":"/grid/server/add"}

XML

A successful add XML response will return the summary object as an element along with the list of objects in a generic object markup.

A sample XML response is shown below:

<gogrid>
  <response method="/grid/server/add" status="success">
    <summary total="1" start="0" returned="1"/>
    <list>
      <object name="server">
        <attribute name="name">API Server</attribute>
        <attribute name="description">GoGrid API Server</attribute>
        <attribute name="ip">
          <object name="ip">
            <attribute name="id">335972</attribute>
            <attribute name="ip">208.113.77.3</attribute>
            <attribute name="subnet">208.113.77.0/255.255.255.240</attribute>
            <attribute name="public">true</attribute>
          </object>
        </attribute>
        <attribute name="ram">
          <object name="option">
            <attribute name="id">2</attribute>
            <attribute name="name">1GB</attribute>
            <attribute name="description">Server with 1GB RAM</attribute>
          </object>
        </attribute>
        <attribute name="image">
          <object name="serverimage">
            <attribute name="id">1</attribute>
            <attribute name="name">centos44_32_apache22php5</attribute>
            <attribute name="description">CentOS 4.4 (32-bit) w/ Apache 2.2 + PHP5</attribute>
          </object>
        </attribute>
        <attribute name="state">
          <object name="option">
            <attribute name="id">3</attribute>
            <attribute name="name">Off</attribute>
            <attribute name="description"></attribute>
          </object>
        </attribute>
        <attribute name="type">
          <object name="option">
            <attribute name="id">1</attribute>
            <attribute name="name">Web Server</attribute>
            <attribute name="description">This server has a public connection to the Internet.</attribute>
          </object>
        </attribute>
        <attribute name="os">
          <object name="option">
            <attribute name="id">5</attribute>
            <attribute name="name">CentOS 4.4 (32-bit)</attribute>
            <attribute name="description">CentOS Linux 4.4 (32-bit)</attribute>
          </object>
        </attribute>
      </object>
    </list>
  </response>
</gogrid>

CSV

A CSV add response will always start with two rows that are not objects. These non-data rows begin with a # (pound/number) symbol. Subsequent rows each represent a data object. The first row contains summary data. The second row identifies the attribute IDs for the data rows. The remaining row represents the added data object.


A sample CSV response is shown below:

# SUCCESS, /grid/server/add, TOTAL, 1, START, 0, RETURNED, 1
# id,name,description,ip.id,ip.ip,ip.subnet,ip.public,ram.id,ram.name,ram.description,image.id,image.name,image.friendlyName,image.description,image.location,image.isActive,image.isPublic,image.createdTime,image.updatedTime,state.id,state.name,state.description,type.id,type.name,type.description,os.id,os.name,os.description
40,API Server,GoGrid API Server,335972,208.113.77.3,208.113.77.0/255.255.255.240,true,2,1GB,Server with 1GB RAM,1,centos44_32_apache22php5,,CentOS 4.4 (32-bit) w/ Apache 2.2 + PHP5,,,,,,1,Started,Server is in active state.,1,Web Server,This server has a public connection to the Internet.,5,CentOS 4.4 (32-bit),CentOS Linux 4.4 (32-bit)

GoGrid Delete API Call Pattern

Delete Request

A delete method call is intended to delete a single object.


Some example get methods are:

Delete Query Parameters

Delete API methods require one of the following three query parameters, id or name or <object type> (this is the object type and will be load balancer or server for grid.loadbalancer.delete and grid.server.delete respectively).


  • Using the id parameter will delete the object based on the id attribute.
  • Using the name parameter will delete the object based on the name attribute.
  • Using the <object type> parameter will delete the object based on the id or name attribute.


If all three parameters are used, the order of precedence is id, name, then <object type>.


Delete will only delete one object. If a call is using ambiguous, non-unique names then an error will be generated.


Required id * string Set this parameter to the id attribute of the object to delete by id.
name * string Set this parameter to the name attribute of the object to delete by id.
  • NOTE: Using this parameter may generate an error if one or more objects share a non-unique name.

* Only one of these parameters id, name, or <object type> is required per delete method call.

Delete Response

A delete response will contain the response status, request method, summary of the list, and a list with the deleted object.


The summary object contains the following three values:

  • total - the total number of objects deleted; this will always be 1
  • start - the current start index for this list of objects; this will always be 0
  • returned - the number of objects returned in this list; this will always be equal to total

JSON

The JSON delete response is a JSON map, { }. The map contains four key value pairs: status, method, summary and list. The status response is either success or failure. The method lists the api method called. The summary value is a map with the total, start, and returned values. The list value is a JSON array of the deleted object. The map, { }, in the list array is the deleted object.



A sample JSON response is shown below:

{"list":[{"object":"server","type":{"object":"option","description":"This server has a public connection to the Internet.","name":"Web Server","id":1},"os":{"object":"option","description":"CentOS Linux 4.4 (32-bit)","name":"CentOS 4.4 (32-bit)","id":5},"description":"testingserver1","image":{"object":"option","description":"CentOS 4.4 (32-bit) w/ Apache 2.2 + PHP5","name":"centos44_32_apache22php5","id":1},"state":{"object":"option","description":"Server is in active state.","name":"Started","id":1},"ram":{"object":"option","description":"Server with 2GB RAM","name":"2GB","id":3},"name":"server1","ip":{"object":"ip","public":true,"subnet":"208.113.77.0/255.255.255.240","ip":"208.113.77.5","id":335974},"id":67}],"summary":{"total":1,"start":0,"returned":1},"status":"success","method":"/grid/server/delete"}

XML

A successful XML response will return the summary object as an element along with the single object that was deleted in a generic object markup. Each <object> element is an object.


A sample XML response is shown below:

<gogrid>
  <response method="/grid/server/delete" status="success">
    <summary total="1" start="0" returned="1"/>
    <list>
      <object name="server">
        <attribute name="id">2112</attribute>
        <attribute name="name">API Server</attribute>
        <attribute name="description">GoGrid API Server</attribute>
        <attribute name="ip">
          <object name="ip">
            <attribute name="id">335972</attribute>
            <attribute name="ip">208.113.77.3</attribute>
            <attribute name="subnet">208.113.77.0/255.255.255.240</attribute>
            <attribute name="public">true</attribute>
          </object>
        </attribute>
        <attribute name="ram">
          <object name="option">
            <attribute name="id">2</attribute>
            <attribute name="name">1GB</attribute>
            <attribute name="description">Server with 1GB RAM</attribute>
          </object>
        </attribute>
        <attribute name="image">
          <object name="serverimage">
            <attribute name="id">1</attribute>
            <attribute name="name">centos44_32_apache22php5</attribute>
            <attribute name="description">CentOS 4.4 (32-bit) w/ Apache 2.2 + PHP5</attribute>
          </object>
        </attribute>
        <attribute name="state">
          <object name="option">
            <attribute name="id">3</attribute>
            <attribute name="name">Off</attribute>
            <attribute name="description"></attribute>
          </object>
        </attribute>
        <attribute name="type">
          <object name="option">
            <attribute name="id">1</attribute>
            <attribute name="name">Web Server</attribute>
            <attribute name="description">This server has a public connection to the Internet.</attribute>
          </object>
        </attribute>
        <attribute name="os">
          <object name="option">
            <attribute name="id">5</attribute>
            <attribute name="name">CentOS 4.4 (32-bit)</attribute>
            <attribute name="description">CentOS Linux 4.4 (32-bit)</attribute>
          </object>
        </attribute>
      </object>
    </list>
  </response>
</gogrid>

CSV

A CSV delete response will always start with two rows that are not objects. These non-data rows begin with a # (pound/number) symbol. Subsequent rows each represent a data object. The first row contains summary data. The second row identifies the attribute IDs for the data rows. The remaining row represents the data object that was deleted.


A sample CSV response is shown below:

# SUCCESS, /grid/server/delete, TOTAL, 1, START, 0, RETURNED, 1
# id,name,description,ip.id,ip.ip,ip.subnet,ip.public,ram.id,ram.name,ram.description,image.id,image.name,image.friendlyName,image.description,image.location,image.isActive,image.isPublic,image.createdTime,image.updatedTime,state.id,state.name,state.description,type.id,type.name,type.description,os.id,os.name,os.description
40,API Server,GoGrid API Server,335972,208.113.77.3,208.113.77.0/255.255.255.240,true,2,1GB,Server with 1GB RAM,1,centos44_32_apache22php5,,CentOS 4.4 (32-bit) w/ Apache 2.2 + PHP5,,,,,,1,Started,Server is in active state.,1,Web Server,This server has a public connection to the Internet.,5,CentOS 4.4 (32-bit),CentOS Linux 4.4 (32-bit)


GoGrid Edit API Call Pattern

Edit Request

An edit method call is intended to edit a single object.


Some example get methods are:

Edit Query Parameters

Edit API methods require one of the following three query parameters, id or name or <object type> (this is the object type and will be load balancer for grid.loadbalancer.edit ).


  • Using the id parameter will edit the object based on the ID attribute.
  • Using the name parameter will edit the object based on the name attribute.
  • Using the <object type> parameter will edit the object based on the ID or name attribute.


If all three parameters are used, the order of precedence is id, name, then <object type>.


Edit will only edit/modify one object. If a call is using ambiguous, non-unique names then an error will be generated.


Required id * string Set this parameter to the id attribute of the object to edit by ID.
name * string Set this parameter to the name attribute of the object to edit by ID.
  • NOTE: Using this parameter may generate an error if one or more objects share a non-unique name.

* Only one of these parameters id, name, or <object type> is required per edit method call.

Edit Response

An edit response will contain the response status, request method, summary of the list, and a list with the edited object.


The summary object contains the following three values:

  • total - The total number of objects edited. This will always be 1.
  • start - The current start index for this list of objects. This will always be 0.
  • returned - The number of objects returned in this list. This will always be equal to total.

JSON

The JSON edit response is a JSON map, { }. The map contains four key value pairs: status, method, summary and list. The status response is either success or failure. The method lists the api method called. The summary value is a map with the total, start, and returned values. The list value is a JSON array of the edited object. The map, { }, in the list array is the edited object.



A sample JSON response is below:

{"list":[{"object":"loadbalancer","virtualip":{"object":"ipportpair","ip":{"object":"ip","public":true,"subnet":"208.113.109.128/255.255.255.240","state":{"object":"option","description":"IP is reserved or in use","name":"Assigned","id":2},"ip":"208.113.109.132","id":645},"port":80},"type":{"object":"option","description":"","name":"Round Robin","id":1},"os":{"object":"option","description":"The F5 Load Balancer.","name":"F5","id":1},"description":"This is a sample of a load balancer that will be edited.","state":{"object":"option","description":"Loadbalancer is enabled and on.","name":"On","id":1},"name":"my load balancer","realiplist":[{"ip":{"object":"ip","public":true,"subnet":"208.113.109.128/255.255.255.240","state":{"object":"option","description":"IP is reserved or in use","name":"Assigned","id":2},"ip":"208.113.109.131","id":644},"port":80},{"ip":{"object":"ip","public":true,"subnet":"208.113.109.128/255.255.255.240","state":{"object":"option","description":"IP is reserved or in use","name":"Assigned","id":2},"ip":"208.113.109.133","id":646},"port":80},{"ip":{"object":"ip","public":true,"subnet":"208.113.109.128/255.255.255.240","state":{"object":"option","description":"IP is reserved or in use","name":"Assigned","id":2},"ip":"208.113.109.134","id":647},"port":80}],"id":70,"persistence":{"object":"option","description":"","name":"None","id":1}}],"summary":{"total":1,"start":0,"numpages":0,"returned":1},"status":"success","method":"/grid/loadbalancer/edit"}

XML

A successful XML response will return the summary object as an element along with the single object that was deleted in a generic object markup. Each <object> element is an object.


A sample XML response is below:

<gogrid>
  <response method="/grid/loadbalancer/edit" status="success">
    <summary total="1" start="0" numpages="0" returned="1"/>
    <list>
      <object name="loadbalancer">
        <attribute name="id">70</attribute>
        <attribute name="name">my load balancer</attribute>
        <attribute name="description">This is a sample of a load balancer that will be edited.</attribute>
        <attribute name="virtualip">
          <object name="ipportpair">
            <attribute name="ip">
              <object name="ip">
                <attribute name="id">645</attribute>
                <attribute name="ip">208.113.109.132</attribute>
                <attribute name="state">
                  <object name="option">
                    <attribute name="id">2</attribute>
                    <attribute name="name">Assigned</attribute>
                    <attribute name="description">IP is reserved or in use</attribute>
                  </object>
                </attribute>
                <attribute name="subnet">208.113.109.128/255.255.255.240</attribute>
                <attribute name="public">true</attribute>
              </object>
            </attribute>
            <attribute name="port">80</attribute>
          </object>
        </attribute>
        <attribute name="type">
          <object name="option">
            <attribute name="id">1</attribute>
            <attribute name="name">Round Robin</attribute>
            <attribute name="description"></attribute>
          </object>
        </attribute>
        <attribute name="persistence">
          <object name="option">
            <attribute name="id">1</attribute>
            <attribute name="name">None</attribute>
            <attribute name="description"></attribute>
          </object>
        </attribute>
        <attribute name="realiplist">          
          <list>
            <object name="ipportpair">
              <attribute name="ip">
                <object name="ip">
                  <attribute name="id">644</attribute>
                  <attribute name="ip">208.113.109.131</attribute>
                  <attribute name="state">
                    <object name="option">
                      <attribute name="id">2</attribute>
                      <attribute name="name">Assigned</attribute>
                      <attribute name="description">IP is reserved or in use</attribute>
                    </object>
                  </attribute>
                  <attribute name="subnet">208.113.109.128/255.255.255.240</attribute>
                  <attribute name="public">true</attribute>
                </object>
              </attribute>
              <attribute name="port">80</attribute>
            </object>
            <object name="ipportpair">
              <attribute name="ip">
                <object name="ip">
                  <attribute name="id">646</attribute>
                  <attribute name="ip">208.113.109.133</attribute>
                  <attribute name="state">
                    <object name="option">
                      <attribute name="id">2</attribute>
                      <attribute name="name">Assigned</attribute>
                      <attribute name="description">IP is reserved or in use</attribute>
                    </object>
                  </attribute>
                  <attribute name="subnet">208.113.109.128/255.255.255.240</attribute>
                  <attribute name="public">true</attribute>
                </object>
              </attribute>
              <attribute name="port">80</attribute>
            </object>
            <object name="ipportpair">
              <attribute name="ip">
                <object name="ip">
                  <attribute name="id">647</attribute>
                  <attribute name="ip">208.113.109.134</attribute>
                  <attribute name="state">
                    <object name="option">
                      <attribute name="id">2</attribute>
                      <attribute name="name">Assigned</attribute>
                      <attribute name="description">IP is reserved or in use</attribute>
                    </object>
                  </attribute>
                  <attribute name="subnet">208.113.109.128/255.255.255.240</attribute>
                  <attribute name="public">true</attribute>
                </object>
              </attribute>
              <attribute name="port">80</attribute>
            </object>
          </list>        
        </attribute>        
        <attribute name="os">
          <object name="option">
            <attribute name="id">1</attribute>
            <attribute name="name">F5</attribute>
            <attribute name="description">The F5 Load Balancer.</attribute>
          </object>
        </attribute>
        <attribute name="state">
          <object name="option">
            <attribute name="id">1</attribute>
            <attribute name="name">On</attribute>
            <attribute name="description">Loadbalancer is enabled and on.</attribute>
          </object>
        </attribute>
      </object>
    </list>
  </response>
</gogrid>

CSV

A CSV edit response will always start with two rows that are not objects. These non-data rows begin with a # (pound/number) symbol. Subsequent rows each represent a data object. The first row contains summary data. The second row identifies the attribute IDs for the data rows. The remaining row represents the data object that was deleted.


A sample CSV response is shown below:

# SUCCESS, /grid/loadbalancer/edit, TOTAL, 1, NUMPAGES, 0, START, 0, RETURNED, 1
# id,name,description,virtualip.ip.id,virtualip.ip.ip,virtualip.ip.state.id,virtualip.ip.state.name,virtualip.ip.state.description,virtualip.ip.subnet,virtualip.ip.public,virtualip.port,type.id,type.name,type.description,persistence.id,persistence.name,persistence.description,os.id,os.name,os.description,state.id,state.name,state.description,realiplist.1.ip.id,realiplist.1.ip.ip,realiplist.1.ip.state.id,realiplist.1.ip.state.name,realiplist.1.ip.state.description,realiplist.1.ip.subnet,realiplist.1.ip.public,realiplist.1.port,realiplist.2.ip.id,realiplist.2.ip.ip,realiplist.2.ip.state.id,realiplist.2.ip.state.name,realiplist.2.ip.state.description,realiplist.2.ip.subnet,realiplist.2.ip.public,realiplist.2.port,realiplist.3.ip.id,realiplist.3.ip.ip,realiplist.3.ip.state.id,realiplist.3.ip.state.name,realiplist.3.ip.state.description,realiplist.3.ip.subnet,realiplist.3.ip.public,realiplist.3.port
70,my load balancer,This is a sample of a load balancer that will be edited.,645,208.113.109.132,2,Assigned,IP is reserved or in use,208.113.109.128/255.255.255.240,true,80,1,Round Robin,,1,None,,1,F5,The F5 Load Balancer.,1,On,Loadbalancer is enabled and on.,644,208.113.109.131,2,Assigned,IP is reserved or in use,208.113.109.128/255.255.255.240,true,80,646,208.113.109.133,2,Assigned,IP is reserved or in use,208.113.109.128/255.255.255.240,true,80,647,208.113.109.134,2,Assigned,IP is reserved or in use,208.113.109.128/255.255.255.240,true,80,


Previous(Anatomy of a GoGrid API Call)
Next (Language Support)
Personal tools