<%= render 'response' %>

Get a Channel Field Feed


To view a Channel's field feed, send an HTTP GET to <%= @ssl_api_domain %>channels/CHANNEL_ID/fields/FIELD_ID.json.xml , replacing CHANNEL_ID with the ID of your Channel and FIELD_ID with the ID of your field.

Valid parameters:
Please note that the results parameter is not compatible with timescale, sum, average, or median.

Example GET:
GET <%= @ssl_api_domain %>channels/9/fields/1.json.xml?results=2

The response will be an HTML page with the JSON Channel's field feed, for example:
{
  "channel":
  {
    "id": 9,
    "name": "my_house",
    "description": "Netduino Plus connected to sensors around the house",
    "latitude": "40.44",
    "longitude": "-79.996",
    "field1": "Light",
    "field2": "Outside Temperature",
    "created_at": "2010-12-13T20:20:06-05:00",
    "updated_at": "2014-02-26T12:43:04-05:00",
    "last_entry_id": 6060625
  },
  "feeds":
  [
    {
      "created_at": "2014-02-26T12:42:49-05:00",
      "entry_id": 6060624,
      "field1": "188"
    },
    {
      "created_at": "2014-02-26T12:43:04-05:00",
      "entry_id": 6060625,
      "field1": "164"
    }
  ]
}
The response will be a JSON object of the Channel's field feed, for example:
{
  "channel":
  {
    "id": 9,
    "name": "my_house",
    "description": "Netduino Plus connected to sensors around the house",
    "latitude": "40.44",
    "longitude": "-79.996",
    "field1": "Light",
    "field2": "Outside Temperature",
    "created_at": "2010-12-13T20:20:06-05:00",
    "updated_at": "2014-02-26T12:43:04-05:00",
    "last_entry_id": 6060625
  },
  "feeds":
  [
    {
      "created_at": "2014-02-26T12:42:49-05:00",
      "entry_id": 6060624,
      "field1": "188"
    },
    {
      "created_at": "2014-02-26T12:43:04-05:00",
      "entry_id": 6060625,
      "field1": "164"
    }
  ]
}
The response will be an XML object of the Channel's field feed, for example:
<?xml version="1.0" encoding="UTF-8"?>
<channel>
  <id type="integer">9</id>
  <name>my_house</name>
  <description>Netduino Plus connected to sensors around the house</description>
  <latitude type="decimal">40.44</latitude>
  <longitude type="decimal">-79.996</longitude>
  <field1>Light</field1>
  <field2>Outside Temperature</field2>
  <created-at type="dateTime">2010-12-13T20:20:06-05:00</created-at>
  <updated-at type="dateTime">2014-02-26T12:49:19-05:00</updated-at>
  <last-entry-id type="integer">6060650</last-entry-id>
  <feeds type="array">
    <feed>
      <created-at type="dateTime">2014-02-26T12:49:04-05:00</created-at>
      <entry-id type="integer">6060649</entry-id>
      <field1>160</field1>
      <id type="integer" nil="true"/>
    </feed>
    <feed>
      <created-at type="dateTime">2014-02-26T12:49:19-05:00</created-at>
      <entry-id type="integer">6060650</entry-id>
      <field1>171</field1>
      <id type="integer" nil="true"/>
    </feed>
  </feeds>
</channel>


<%= render 'response' %>

Get Last Entry in a Field Feed


To get the last entry in a Channel's field feed, send an HTTP GET to <%= @ssl_api_domain %>channels/CHANNEL_ID/fields/FIELD_ID/last.json.xml , replacing CHANNEL_ID with the ID of your Channel and FIELD_ID with the ID of your field.

Valid parameters:
Example GET:
GET <%= @ssl_api_domain %>channels/9/fields/1/last.json.xml

The response will be the Channel field's most recent value, for example:
176
The response will be a JSON object of the most recent feed, for example:
{
  "created_at": "2014-02-26T21:27:21Z",
  "entry_id": 6061519,
  "field1": "176"
}
The response will be an XML object of the most recent feed, for example:
<?xml version="1.0" encoding="UTF-8"?>
<feed>
  <created-at type="dateTime">2014-02-26T21:28:51Z</created-at>
  <entry-id type="integer">6061525</entry-id>
  <field1>200</field1>
  <id type="integer" nil="true"/>
</feed>