Skip to main content

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:

  1. Request the recent records needed to render the initial state.
  2. Subscribe to the same provider, dataset, and asset.
  3. Merge new events into application state.
  4. Unsubscribe when the component unmounts or the selected asset changes.
  5. Re-fetch data after a connection gap when continuity matters.

Event types

EventMeaning
Empty event valueA new record was created.
updateAn existing record changed.
destroyA record was removed.

See Receive Real-Time Updates for an implementation pattern.