> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siftstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Build your own live telemetry display

> Poll the Sift API from a backend service to stream live Run telemetry to a custom application or display.

After completing this workflow, you can show telemetry in your own application from a Run as it streams into Sift.

## Before you begin

* You have [a Sift API key and your base URLs](https://docs.siftstack.com/documentation/manage/set-up-api-access.md).
* 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 with [`ListRuns`](https://docs.siftstack.com/api-reference/runservice/listruns) and polls [`GetData`](https://docs.siftstack.com/api-reference/dataservice/getdata-v2) for new data.

```mermaid theme={null}
%%{init: {"flowchart": {"htmlLabels": false}}}%%
graph TB
  C(Sift API):::highlight
  B(Your backend service):::highlight
  A(Your display):::highlight

  C -. returns the latest Run and data .-> B
  B -- polls ListRuns and GetData --> C
  B -- sends updates --> A

  classDef highlight fill:transparent,stroke:#ee4220,stroke-width:0px,color:#ee4220;
  linkStyle default stroke:#ee4220,stroke-width:1px;
```

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

1. Run a backend service that stores your [API key](https://docs.siftstack.com/documentation/manage/set-up-api-access.md).
   * Use an API key [created in the environment](https://docs.siftstack.com/documentation/manage/set-up-api-access.md#use-api-keys-across-multiple-environments) that contains the Asset's data.
   > [!WARNING]
   >
   > **Browser requests**: Do not call the Sift API directly from the browser. Doing so exposes your API key, and the API does not accept requests from browser pages outside Sift.
2. From the service, call [`ListRuns`](https://docs.siftstack.com/api-reference/runservice/listruns) with a `filter` on `asset_id`, set to the ID of the Asset you want to follow, and a `pageSize` of `1`.
   * Sift does not flag a Run as live. `ListRuns` orders 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's `stop_time` forward with each new data point, so it is set even while the Run is live.
3. Poll [`GetData`](https://docs.siftstack.com/api-reference/dataservice/getdata-v2) about once per second for the latest window of the Channels you need.

   ```bash theme={null}
   curl --request POST \
     --url "https://api.siftstack.com/api/v2/data" \
     --header "Authorization: Bearer $SIFT_API_KEY" \
     --header "Content-Type: application/json" \
     --data '{
       "queries": [
         {
           "channel": {
             "channelId": "YOUR_CHANNEL_ID_1",
             "runId": "YOUR_RUN_ID"
           }
         },
         {
           "channel": {
             "channelId": "YOUR_CHANNEL_ID_2",
             "runId": "YOUR_RUN_ID"
           }
         }
       ],
       "startTime": "2026-03-13T19:43:25.557Z",
       "endTime": "2026-03-13T19:43:45.557Z",
       "sampleMs": 0
     }'
   ```
4. Send the updates to your display using any method your application supports, such as WebSocket or Server-Sent Events (SSE).

## Verify

Launch your display while the Asset streams a Run. Confirm the UI renders updated telemetry approximately once per second.

## Reference

* [`ListRuns` API reference](https://docs.siftstack.com/api-reference/runservice/listruns)
* [`GetData` API reference](https://docs.siftstack.com/api-reference/dataservice/getdata-v2)
* [Query Channel data](https://docs.siftstack.com/api/export/export-data-programmatically.md#query-channel-data)
