stop_live_channel

Stop a live channel; optionally block until it reaches Idle.

stop_live_channel

Stop a live channel; optionally block until it reaches Idle.

Send a stop command to a channel. With wait_for_stop=True the SDK blocks until the channel reports Idle (polling up to 720s at 2s intervals).

Safety class: C · API type: admin · Min version:

📘

Confinement

Class C: global side effect (tears down streaming infrastructure). NON-PROD ONLY. Use this to return a channel started by start_live_channel back to Idle.

Signatures

def stop_live_channel(sdk, live_channel_id, wait_for_stop=None):
    """Stop the channel. With wait_for_stop=True, block until Idle.
    Returns None; confirm via get_live_channel()['status']['description']."""
    return sdk.stop_live_channel(live_channel_id, wait_for_stop)
export async function stopLiveChannel(sdk, liveChannelId, waitForStop = null) {
    // Confirm via getLiveChannel(...).status.description === "Idle".
    return await sdk.stopLiveChannel(liveChannelId, waitForStop);
}

Parameters

Parameter (Python)Parameter (JS)TypeRequiredNotes
sdksdkNomad_SDKyesadmin-apiType client
live_channel_idliveChannelIdstryese.g. f6d0b1f5-6a1b-4369-b9b5-4fef074b503
wait_for_stopwaitForStopbool | Nonenopoll up to 720s @2s until Idle

Returns

None — no payload; raises on HTTP error. Confirm via get_live_channel -> status.description == 'Idle'.

Errors

  • 401 unauthenticated
  • 404 channel not found
  • InvalidAPITypeException if session is not admin

Notes

Real-world usage

  • Maps to POST /api/liveChannel/{id}/stop; moves the channel RunningStoppingIdle.
  • This is the cleanup half of the start/stop pair: always stop a channel you started so it doesn't keep consuming infrastructure (see recipes/live-channels.md).

Class C — non-prod only. Skip Class C on prod. Requires an admin session (raises InvalidAPITypeException otherwise).

Real-world usage

  • Maps to POST /api/liveChannel/{id}/stop; moves the channel RunningStoppingIdle.
  • The cleanup half of the start/stop pair: always stop a channel you started so it doesn't keep consuming infrastructure (see recipes/live-channels.md).

Class C — non-prod only. Skip Class C on prod. Requires an admin session (raises InvalidAPITypeException otherwise).

See also: Python ↔ JS naming map · Return shapes.