This action sets the retention date for recordings that match the specified criteria to the specified number of days.
The action will update the retention_date field in the recording_info table, which when set will trigger the recording retention job to delete the recording after that date.
The action sets the when_retention_date_changed field to the current date and time and the message field to RETENTION DATE CHANGED TO and the date.
The start_date and end_date parameters are required and specify the date range to search for recordings. The action_filter, if present, will restrict the updates to only those records in recording_info
that match the action filter.
If you need to retain a recording, you can set the retain_for parameter to a large number of days (for example, 10,000).
Parameters
| Parameter | Description | |
|---|---|---|
| start_date | Required | The start date to search for recordings |
| end_date | Required | The end date to search for recordings |
| action_filter | Optional | The action filter to search for recordings. If not specified, applies the retention period to all records. |
| media_type | Optional | The media type to search for recordings. If not specified, applies the retention period to all media types. |
| retain_for | Optional | The number of days to retain the recordings. Defaults to 7. |
Tables Affected
Variables Set
No variables set.
Permissions needed
- recording:recording:view or recording:recordingSegment:view
- recording:recording:editRetention or recording:screenRecording:editRetention
Examples
- set_recording_retention( start_date='2022-01-01', end_date='2022-01-31', retain_for=30)
