Retrieving Timeseries Data
Historian Multi provides a single client for querying multiple historians. This overview captures shared details for read and aggregation methods.
Timestamp Formats Accepted
Section titled “Timestamp Formats Accepted”Most read methods accept timestamps as:
- Python
datetimeobjects - Epoch seconds (
intorfloat) or epoch milliseconds (int) - Strings parsed by dateparser (e.g.
"2024-01-01 00:00:00") - Relative strings like
"now"or"1 hour ago"
The library converts timestamps to epoch milliseconds before sending requests.
Methods
Section titled “Methods”- getCurrentDataPoints
- getInterpolatedPoints
- getInterpolatedRange
- getRawDatapoints
- getClosestRawPoint
- getAggregates
- getAggregateIntervals
Output Format Examples
Section titled “Output Format Examples”JSON (default)
Section titled “JSON (default)”Single tag responses are simplified to a list of points (or a single point). Multi-tag responses return a dictionary keyed by tag.
{ "results": { "DEMO_02TI301.PV": { "dataPoints": [{ "timestamp": 1704067200000, "value": 38.0, "status": "OK" }] } }}DataFrame (df)
Section titled “DataFrame (df)” DEMO_02TI301.PV DEMO_02TI201.PV2024-01-01 00:00:00 38.0 42.02024-01-01 01:00:00 37.5 41.7String (string)
Section titled “String (string)”Returns a JSON string of the results.