---
title: "Get data stream ingestion health"
method: GET
path: "/data_streams/{key}/health"
---

# Get data stream ingestion health

`GET /data_streams/{key}/health`

Cheap, indexed snapshot of ingestion health for the stream — record count, file import totals, orphan records, bulk request counters by status, and last ingestion time. Safe to poll from the UI.

## Path parameters

- `key` string, required

## Response `200`

Health snapshot

- DataStreamHealth — Ingestion health snapshot for a data stream. All counts are indexed lookups; safe to poll.
  - `records_count` integer
  - `imports_count` integer — Total file imports on this stream, all statuses
  - `imports` object — File imports on this stream, counted by status
    - `pending` integer
    - `processing` integer
    - `replicating` integer
    - `completed` integer
    - `failed` integer
    - `cancelled` integer
    - `stuck` integer — Currently `processing` with no heartbeat for >5 minutes
  - `last_ingestion_at` string, date-time, nullable — Most recent record `created_at` on this stream

## Other responses

- `401` — Unauthorized
- `404` — Data stream not found

---

[API](https://skmtc.net/endclose/apis/end-close-api.md) · [All operations](https://skmtc.net/endclose/apis/end-close-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/endclose/end-close-api/revisions/613ceff68dc7/schema)
