api
/api/import/timeseries
June 18, 2008 5:19 PM
This allows you to insert Data Points into the system using a simple RESTful url. This is the preferred method if you are a developer and wish to utilize Trendrr's graphing capabilities. Each time you create a RESTful Data Set you will be given a key. This key uniquely identifies the specific Data Set.
ex: http://www.trendrr.com/api/import/timeseries?dataset_key={dataset_key}&value=1.4&date=1210107605

params:
dataset_key (required) This is the key your were given when you activated the custom Data Set. Keys are unique for each Data Set.
value This is the value you would like to insert. Can be positive or negative, whole or decimal.

Example: if you insert a value of 6 on 02/01/2008 12 pm your graph will show that exact Data Point. If you are unsure, this is probably the one to choose.
return This value specifies how you would like the response sent back (either a success message or an error message).

Possible Values:
  • xml (Default) an xml feed
  • json returns the feed in JSON format

You may also specify a valid URL as the return value. In which case the system will issue a redirect to that URL.
date This is the date that corresponds to the value you are inserting. Defaults to current date/time.

Should be in either XML encoding, or the number of seconds since epoch.
increment Setting an increment will increment the value for the current increment_timescale. This is useful when you would like to track how some value changes for a specific timeframe. For example, this would be an appropriate type to track web clicks per day. You can send Trendrr an increment for each web visitor and your graph will show the number of visitors per day.

If an increment parameter is passed in, then any value parameters are ignored.
increment_timescale Use with increment.
Possible Values:
  • hour (Default)
  • day (default)
  • year