<%= render 'response' %>

Get a Channel Feed


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

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/feeds.json.xml?results=2

The response will be an HTML page with the JSON Channel 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",
      "field2": "25.902335456475583"
    },
    {
      "created_at": "2014-02-26T12:43:04-05:00",
      "entry_id": 6060625,
      "field1": "164",
      "field2": "25.222929936305732"
    }
  ]
}
The response will be a JSON object of the Channel 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",
      "field2": "25.902335456475583"
    },
    {
      "created_at": "2014-02-26T12:43:04-05:00",
      "entry_id": 6060625,
      "field1": "164",
      "field2": "25.222929936305732"
    }
  ]
}
The response will be an XML object of the Channel 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>
      <field2>25.307855626326962</field2>
      <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>
      <field2>22.929936305732483</field2>
      <id type="integer" nil="true"/>
    </feed>
  </feeds>
</channel>

Live examples:

<%= render 'response' %>

Get Last Entry in a Channel Feed


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

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

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",
  "field2": "28.195329087048833"
}
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",
  "field2": "28.195329087048833"
}
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>
  <field2>28.365180467091296</field2>
  <id type="integer" nil="true"/>
</feed>


<%= render 'response' %>

Get Specific Entry in a Channel


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

Valid parameters:
Example GET:
GET <%= @ssl_api_domain %>channels/9/feeds/6061519.json.xml

The response will be a JSON object of the feed entry, for example:
{
  "created_at": "2014-02-26T21:27:21Z",
  "entry_id": 6061519,
  "field1": "176",
  "field2": "28.195329087048833"
}
The response will be a JSON object of the feed entry, for example:
{
  "created_at": "2014-02-26T21:27:21Z",
  "entry_id": 6061519,
  "field1": "176",
  "field2": "28.195329087048833"
}
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:27:21Z</created-at>
  <entry-id type="integer">6061519</entry-id>
  <field1>176</field1>
  <field2>28.195329087048833</field2>
  <id type="integer" nil="true"/>
</feed>