Historical and Real-Time Data
Historical and live data solve different parts of the same workflow.
Historical records
The Data API returns records already stored in a dataset. Use it to:
- Populate an initial chart or table.
- Export a time range.
- Rebuild application state after reconnecting.
- Query calculated engineering data.
For the latest records, sort by timestamp descending. For ordered processing, sort ascending and page forward.
Live updates
In a Dev Center frontend application, socketClient notifies the app when dataset records are created, updated, or destroyed. A subscription does not replace the initial historical request.
The recommended sequence is:
- Request the recent records needed to render the initial state.
- Subscribe to the same provider, dataset, and asset.
- Merge new events into application state.
- Unsubscribe when the component unmounts or the selected asset changes.
- Re-fetch data after a connection gap when continuity matters.
Event types
| Event | Meaning |
|---|---|
| Empty event value | A new record was created. |
update | An existing record changed. |
destroy | A record was removed. |
See Receive Real-Time Updates for an implementation pattern.