Skip to content
中文

Enable a stream

Code Mode: praxis.media.streams.enable.create

HTTP: POST /media/v1/streams/{stream_id}/enable

Bring a disabled stream back to idle so a source may drive it again; it does not start anything by itself. Only a disabled stream can be enabled; an idle, waiting or active stream answers 409. Use streams.disable.create to stop a stream. Example: POST /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/enable with no body.

Signature

praxis.media.streams.enable.create(args:{path:{/** e.g. "mst_zpnqd7a2kxwg3vhr5tj4bfm6ec" */ stream_id:string}}):Promise<{/** The stream id (mst_ and 26 lowercase base32 characters); stable and never reused. e.g. "mst_zpnqd7a2kxwg3vhr5tj4bfm6ec" */ id:string;/** Always media.stream; tells a stream from other objects in a mixed list. e.g. "media.stream" */ object:"media.stream";/** idle means no source is connected; waiting means a pulled source is not live yet (no failure and no charge beyond the poll); active means media is flowing and a e.g. "idle" */ status:"idle"|"waiting"|"active"|"disabled";input:{/** pull means Praxis pulls the address in url; push means your encoder or app sends to the push address returned when the stream is created. e.g. "pull" */ kind:"pull"|"push";/** Only for kind push; omit it for a push over the Praxis socket from a browser or app. e.g. "rtmp" */ protocol?:"rtmp"|"srt";/** The address to pull, present only when kind is pull: https, http (HLS .m3u8, HTTP-FLV) or rtmp, rtmps. e.g. "https://live.example.com/room/index.m3u8" */ url?:string};/** Seconds a dropped source may take to come back and continue the same broadcast. e.g. 60 */ reconnect_window_s:number;/** Seconds one broadcast may run before it ends. e.g. 43200 */ max_continuous_duration_s:number;recording:{/** automatic records every broadcast into a Media asset; off records nothing (the default). e.g. "off" */ mode?:"automatic"|"off";/** Which rendition to record: source keeps the stream as it arrives; highest, sd and lowest pick among the renditions the source offers; audio_only keeps no video. e.g. "source" */ rendition?:"source"|"highest"|"sd"|"lowest"|"audio_only";/** The Media library the recordings go to; omit to use the default library of your organization. */ library_id?:string;/** The folder inside the library the recordings are placed in; omit for the library root. */ asset_folder?:string;/** Delete each recording this many days after it was made; omit to keep recordings until you delete them. e.g. 30 */ delete_after_days?:number};playback?:{/** true keeps the newest segments of the broadcast readable so a player can follow it live (about a minute of media at a time); false (the default) keeps nothing f e.g. true */ enabled?:boolean};/** The processing attached to the stream, or null for none. */ pipeline_id:(string)|null;/** The Media asset the current broadcast is being recorded into, or null when no broadcast is recording. */ active_asset_id:(string)|null;/** The assets of the broadcasts before the current one, newest first. */ recent_asset_ids:Array<string>;/** The live health of the broadcast in progress; null unless the stream is active. */ health:(({/** Kilobits per second received over the last minute (bytes received over the media time they cover); null when no segment arrived in that minute. e.g. 2500 */ bitrate_kbps:(number)|null;/** Milliseconds from a segment's wall-clock start to the moment it was processed, averaged over the last minute. e.g. 1800 */ latency_ms:(number)|null;/** Segments the source skipped in this broadcast. e.g. 0 */ dropped_segments:number;/** Times the source dropped and came back inside the reconnect window in this broadcast. e.g. 1 */ reconnects:number;/** When the newest segment was processed, RFC 3339 UTC; null before the first segment of the broadcast. e.g. "2026-11-28T12:05:00.000Z" */ last_segment_at:(string)|null}))|null;usage:{/** The broadcast in progress; null unless the stream is active. */ broadcast:(({/** Seconds the stream was live, to the millisecond. e.g. 90.5 */ stream_seconds:number;/** Seconds of processing (pipeline processors and alert judgments) run for the stream, to the millisecond. e.g. 1.25 */ processor_seconds:number;/** Bytes recorded from the stream. e.g. 18500000 */ recorded_bytes:number}))|null;/** Across every broadcast of the stream. */ total:({/** Seconds the stream was live, to the millisecond. e.g. 90.5 */ stream_seconds:number;/** Seconds of processing (pipeline processors and alert judgments) run for the stream, to the millisecond. e.g. 1.25 */ processor_seconds:number;/** Bytes recorded from the stream. e.g. 18500000 */ recorded_bytes:number})};/** When the stream was created, RFC 3339 UTC. e.g. "2026-11-28T12:00:00.000Z" */ created_at:string;/** When the stream last changed (a setting or its status), RFC 3339 UTC. e.g. "2026-11-28T12:05:00.000Z" */ updated_at:string}>;

Parameters

NameInTypeRequiredDescription
stream_idpathstringyesThe 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.

Responses

StatusContent typesDescription
200application/jsonThe stream, now idle.
404application/jsonNo stream with this id in your organization, or Media Streams is not released for it.
409application/jsonThe stream is not disabled; only a disabled stream can be enabled.