Skip to main content

HTTP API

Media Ingress exposes a small HTTP API for health checking, monitoring and load balancing. It is served on the address configured in the [http] section of the configuration file: port 8086 in the example configuration.

Unlike the Packager API, this API is read-only: streams are published and consumed over the media protocols themselves (RTMP, SRT, MoQ), not through HTTP.

Endpoints​

GET /healthcheck​

Returns 200 OK if the Media Ingress process is running. Use this as a liveness probe.

GET /status​

Reports whether the instance can accept more sessions. Use this as a readiness probe, or as the health check behind a load balancer.

StatusMeaning
200 OKThe instance has capacity for more sessions.
503 Service UnavailableThe instance is at its limit. Send new traffic elsewhere.

Capacity is governed by max_load and adapter_speed_mbps in the [common] section of the configuration file.

GET /state​

Returns a JSON document describing the current sessions: the streams being published, the subscribers attached to them, and per-track bitrates. Each subscriber entry carries its id, source type, IP address, an optional tag, and the bitrate of every track it is receiving.

Poll this endpoint for an operational view of what the instance is doing.

Example​

bash
curl http://localhost:8086/state

GET /metrics​

Returns Prometheus metrics in text format. See Metrics for the main metric families.

MoQ over WebSocket​

Media over QUIC streams can also be published and consumed over WebSocket, which is useful where plain QUIC is blocked by intermediate networks.

note

These endpoints are served by a separate listener with its own address, configured in the [moq_ws] section of the configuration file, not on the [http] port used by the endpoints above.

toml
[moq_ws]
host = "0.0.0.0"
port = 8087

GET /voq/publish​

Publishes a MoQ stream over a WebSocket connection, upgraded from HTTP.

GET /voq/subscribe​

Subscribes to a MoQ stream over a WebSocket connection, upgraded from HTTP. Name the stream in the query string, for example /voq/subscribe?streamKey=YOUR_STREAM_KEY; id, key and stream_key are accepted too. Without a stream key the request fails with 400 Bad Request.

When Media Ingress sits behind a reverse proxy, that proxy should set the X-Real-IP header. Media Ingress uses it to attribute sessions to the real client; without it every session is attributed to the proxy's address.

Metrics​

Metrics are prefixed vindral_ingress_ and most carry stream_key, source_type and session labels. The main families:

MetricsWhat they show
vindral_ingress_session_info, vindral_ingress_uptime_seconds, vindral_ingress_session_bytes_processedWhich sessions are connected, for how long, and how much data they carried.
vindral_ingress_frame_rate, vindral_ingress_source_packet_arrival_rate, vindral_ingress_source_packet_arrival_variationIncoming frame and packet rate per track, and how evenly packets arrive.
vindral_ingress_packet_arrival_min_delta, _avg_delta, _max_delta, vindral_ingress_publisher_keyframe_timestamp_avg_deltaGaps between packets and keyframes. Large or growing gaps point to an unstable contribution link.
vindral_ingress_srt_*SRT link statistics: packets and bytes sent, received, lost, retransmitted and dropped.
vindral_ingress_moq_track_discontinuity_count, vindral_ingress_moq_track_skipped_sequences_countGaps in MoQ tracks.
vindral_ingress_dropped_tracks_count, vindral_ingress_source_timestamp_rollover_*Tracks dropped at ingest, and timestamp rollovers in the source.

Alert on a session disappearing from vindral_ingress_session_info, on rising SRT loss or drops, and on /status returning 503.

note

Metric labels include stream keys. Keep the HTTP port on a private network.