api
/api/feeds/dataset
June 18, 2008 4:49 PM
This provides data from a specific dataset in various feed formats.
Note - You need the dataset_id. If you only have the graph_id you can still get the export the dataset via the /api/feeds/graph_dataset feed.

authentication is optional (will allow you to view datasets that are not public).

params:
id (required) this is the id of the dataset
return This value specifies what format you would like for the feed

Possible Values:
  • xml (Default) an xml feed
  • json returns the feed in JSON format
  • excel returns an excel file
start index of datapoint to start with. a start of 0 would be the oldest datapoint in the dataset.
max maximum number of datapoints to return.
sort_dir What direction the datapoints are sorted. Timeseries datapoints are always sorted by date.

Possible Values:
  • asc (Default) points are returned oldest first
  • desc points are returned oldest first
start_date You can specify a start and end date to return only the datapoints between those to dates.

Should be in either XML encoding, or the number of seconds since epoch.
end_date see start_date


Example:
http://trendrr.com/api/feeds/dataset?id=573217&return=xml


<?xml version="1.0" encoding="UTF-8"?>

<dataset>
  <dataSourceName>Total Blog Posts - IceRocket.com</dataSourceName>
  <lastUpdated>2009-07-15T19:49:57</lastUpdated>
  <dataStartedCollecting>2009-03-10T19:36:52</dataStartedCollecting>
  <color>353566</color>
  <input>http://www.icerocket.com/search?tab=blog&amp;q=trendrr</input>
  <legendText>trendrr</legendText>
  <renderType>line</renderType>
  <invert>false</invert>
  <id>573217</id>
  <totalPoints>125</totalPoints>
  <drawTrendLine>false</drawTrendLine>
  <values>
    <point>
      <date>2009-07-15T19:49:56</date>
      <value>298</value>
    </point>
    <point>
      <date>2009-07-14T19:49:51</date>
      <value>338</value>
    </point>

...

    <point>
      <date>2009-03-11T20:37:25</date>
      <value>192</value>
    </point>
    <point>
      <date>2009-03-10T20:37:13</date>
      <value>189</value>
    </point>
  </values>
  <dataStartedCollecting>2009-03-10T19:36:52</dataStartedCollecting>

</dataset>