The Content Purge API enables users to remove specific segments of recorded content by specifying the stream_id, event_name, and a start/stop time range. This feature ensures precise control over the retention buffer, allowing administrators to delete unwanted or obsolete content efficiently.
Key Details
Input Parameters:
- stream_id: The unique identifier of the stream.
- event_name: The name of the event under the stream.
- start_time: The beginning of the segment received time range for deletion (in a Unix timestamp format in seconds).
- end_time: The end of the time range for deletion (in a Unix timestamp format in seconds).
Behavior:
- Content in the specified time range will no longer be available for playback.
Outcome:
- Once deleted, the content will no longer be accessible for playback via MSL5 Origin.
Use Cases
- Ensure compliance with content retention policies by deleting content that is no longer needed or required by regulations.
- Address user requests to excise specific portions of a stream (e.g., errors, sensitive content).
Impact on Playback
When a user requests playback that includes a deleted segment:
- The MSL5 Origin will output a playlist with a discontinuity tag at the point where the content was removed.
- This ensures a seamless playback experience, with the player skipping over the missing segments without error.
- Since MSL5 Origin is not aware of the AMD properties that are using the specific stream, the user should issue the purge cache command to the AMD for the specific stream/event.
Content Purge API Endpoints
DELETE {{base_url}}/api/v1/streams/{stream_id}/events/{event_name}/retention_buffer
This API marks recorded content in the MSL5 Origin retention buffer as unavailable for a specific stream and event within a given time range, without physically removing segment files. If the requested start_time or end_time falls within a segment, the entire segment is marked unavailable to ensure complete exclusion from playlists and downloads.
GET {{base_url}}/api/v1/streams/{stream_id}/events/{event_name}/retention_buffer/deleted
This API lists all time ranges of segments marked as unavailable within the retention period for a specific stream and event. It returns the actual time ranges of the affected segments (in epoch time), which may extend beyond the requested deletion range if partial segments were included.
Authentication: Both APIs use the same Bearer token as other MSL5 Origin APIs.
Impact: The DELETE API marks entire segments as unavailable, including those partially overlapping the requested time range, creating gaps reported by the GET API. Segment files remain on disk but are excluded from playlists and downloads.
Segment Boundary Handling: If start_time or end_time fall within a segment, the entire segment is marked unavailable, and the GET API reports the segment’s full time range.
AMD Cache: MSL5 Origin is unaware of AMD properties using the stream, so users must issue a purge cache command to the AMD for the specific stream/event after marking content unavailable.
Logging: DELETE operations are logged with stream_id, event_name, and time range. GET requests are logged with query parameters.
Alignment: Uses start_time and end_time in epoch time (seconds) to match systems like MSL4.
These APIs build on the existing GET {{base_url}}/api/v1/streams/{stream_id} endpoint, ensuring consistency and simplicity.