跳转到内容
EN

List the events of a stream

Code Mode: praxis.media.streams.events.list

HTTP: GET /media/v1/streams/{stream_id}/events

Read the stream’s event log in order, to follow what the stream did or to catch up after a disconnect: pass after set to the highest seq you have seen and you receive every later event, oldest first, up to limit (1 to 100, default 100). Events are delivered at least once and each has a stable id, so a repeat is the same event. Kinds are the life cycle of the stream (stream.waiting, stream.connected, stream.active, stream.disconnected, stream.idle), recording.ready and recording.failed, output.status, and the results of its pipeline (transcript.partial, transcript.final, frame.described, alert, pipeline.unsupported_audio, pipeline.describe_failed). at is wall-clock time and at_source says whether it came from the source (program_date_time) or was the time Praxis received it; offset_ms is the position inside the stream when known. Events are kept at least 24 hours. When has_more is false next_after is the seq to pass next time. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/events?after=12&limit=50.

签名

praxis.media.streams.events.list(args:{path:{/** e.g. "mst_zpnqd7a2kxwg3vhr5tj4bfm6ec" */ stream_id:string};query?:{/** e.g. 12 */ after?:number;/** e.g. 50 */ limit?:number}}):Promise<{/** Always list. e.g. "list" */ object:"list";/** The events of this page, by seq ascending. */ data:Array<{/** The event id, globally unique; a repeat delivery has the same id. e.g. "evt_zpnqd7a2kxwg3vhr5tj4bfm6ec" */ id:string;/** Always media.stream.event. e.g. "media.stream.event" */ object:"media.stream.event";/** The stream the event belongs to. e.g. "mst_zpnqd7a2kxwg3vhr5tj4bfm6ec" */ stream_id:string;/** The event's position in this stream's log: starts at 1, only grows, never reused. e.g. 12 */ seq:number;/** stream.waiting: a pulled source is not live yet; stream.connected: the source connected; stream.active: media started flowing; stream.disconnected: the source d e.g. "stream.active" */ kind:"stream.waiting"|"stream.connected"|"stream.active"|"stream.disconnected"|"stream.idle"|"recording.ready"|"recording.failed"|"output.status"|"transcript.partial"|"transcript.final"|"frame.described"|"alert"|"pipeline.unsupported_audio"|"pipeline.describe_failed";/** Where in the stream the event happened, in milliseconds from its start; null when it has no position. e.g. 4200 */ offset_ms:(number)|null;/** The wall-clock time of the event, RFC 3339 UTC; align it with outside data using this, not the offset. e.g. "2026-11-28T12:00:04.200Z" */ at:string;/** Where at comes from: program_date_time is the time the source stamped in its HLS playlist; received is the time Praxis received it. e.g. "received" */ at_source:"program_date_time"|"received";/** Details of the event: status (the stream status after it), cause (what drove it) and, for a refusal, reason. */ data:{[key:string]:unknown}}>;/** True when more events follow the last one of this page. */ has_more:boolean;/** The seq to pass as after to continue; the last seq of this page, or the after you sent when the page is empty. e.g. 12 */ next_after:number}>;

参数

名称位置类型必填说明
stream_idpathstring是The stream’s id, the id field returned by streams.create or streams.list (mst_ followed by 26 lowercase base32 characters); a stream of another organization answers 404.
afterquerynumber否The highest seq you already have; you receive events with a greater seq. Omit or 0 to read from the start of the retained log.
limitquerynumber否How many events one page holds, 1 to 100; default 100.

响应

状态码内容类型说明
200application/jsonThe events after the given seq, oldest first.
400application/jsonafter is not a sequence number, or limit is not an integer from 1 to 100. Correct the parameter and send again.
404application/jsonNo stream with this id in your organization, or Media Streams is not released for it.