This is an old revision of the document!


Historical Data API

The Historical Data API allows you to fetch historical information about ARDI assets.

Historical queries are performed using a HTTP GET or POST request on /api/gethistorybulk.

Parameters

NameUsage
startThe start time for the query. This is specified in YYYY-MM-DD HH:MM:SS and must be provided in UTC
endThe end time for the query. Formatted as above.
pointsThe comma-delimited list of data points to read
formatThe format of the returned data. See Data Formats below
functionThe query function to use. See Query Functions below
grainThe resolution of the returned data. See Grain below

Data Formats

This function can provide data in a variety of formats depending on the application.

Note in all of these formats, there are three fields returned - the time stamp, the value and the point number. The point number is a zero-based index into the list of data points you provided.

For example, if you called the API function with points set to '201:29:measurement,255:29:measurement', values for the first point would have an point number of '0' and the second a point number of '1'.

TDL - Tab Delimited

2012-11-29 05:00:00<tab>0<tab>25.44
2012-11-29 05:00:00<tab>1<tab>22.5

TDLE - Tab Delimited with Unix Epoch

1354165200<tab>0<tab>25.44
1354165200<tab>1<tab>22.5

XML - Tab Delimited with Unix Epoch

<recording>
   <sample time="2012-11-29 05:00:00" point="0" value="25.44"/>
   <sample time="2012-11-29 05:00:00" point="1" value="22.5"/>
</recording>

JSON - Javascript Object Notation Format

Note that timestamps are delivered as Javascript timestamps (UTC milliseconds)

{ "records": [
  [ 13541652000000,0,25.44 ],
  [ 13541652000000,1,22.5 ] ]
}