Before you begin
- You have a Sift API key and your base URLs.
- You have an Asset that is streaming live data to Sift in a Run.
How live telemetry reaches your display
Your application can read telemetry from Sift while a Run streams. Because Sift does not push data automatically, your application must poll the API. To protect your API key, build a backend proxy service to poll Sift and relay telemetry updates to your client display. The service finds the latest Run for the Asset withListRuns and polls GetData for new data.
Sift does not support embedding a Sift view in another page, such as an internal dashboard or a wiki page.
Relay live telemetry through a backend service
-
Run a backend service that stores your API key.
- Use an API key created in the environment that contains the Asset’s data.
-
From the service, call
ListRunswith afilteronasset_id, set to the ID of the Asset you want to follow, and apageSizeof1.- Sift does not flag a Run as live.
ListRunsorders results newest first by default, so the first result is the latest Run for the Asset. - This follows the latest test when your system creates a new Run for each test.
- Do not filter on an empty
stop_time. Sift moves a streaming Run’sstop_timeforward with each new data point, so it is set even while the Run is live.
- Sift does not flag a Run as live.
-
Poll
GetDataabout once per second for the latest window of the Channels you need. - Send the updates to your display using any method your application supports, such as WebSocket or Server-Sent Events (SSE).