- delete_live_stream - Delete a stream
Permanently deletes a specified live stream from the workspace. If the stream is active, the encoder is disconnected and ingestion stops immediately. This action is irreversible, and any future playback attempts fail as a result.
Provide the streamId in the request to terminate active connections and remove the stream from the workspace. You can further look for video.live_stream.deleted webhook to notify your system about the status.
For an online concert platform, a trial stream was mistakenly made public. The event manager deletes the stream before the concert begins to avoid confusion among viewers.
Related guide: Manage streams
import os
import json
from fastpix_python import Fastpix, models
with Fastpix(
security=models.Security(
username="your-access-token",
password="your-secret-key",
),
) as fastpix:
res = fastpix.manage_live_stream.delete_live_stream(stream_id="your-stream-id")
# Handle response
print(json.dumps(res.model_dump(mode="json", by_alias=True, exclude_unset=True), indent=2))| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
stream_id |
str | ✔️ | Upon creating a new live stream, FastPix assigns a unique identifier to the stream. | your-stream-id |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.DeleteLiveStreamResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.FastpixDefaultError | 4XX, 5XX | */* |