Skip to main content

recordings

Creates, updates, deletes, gets or lists a recordings resource.

Overview

Namerecordings
TypeResource
Idcloudflare.realtime_kit.recordings

Fields

The following fields are returned by SELECT queries:

Success response

NameDatatypeDescription
idstring (uuid)ID of the recording
session_idstring (uuid)ID of the meeting session this recording is for.
output_file_namestringFile name of the recording.
audio_download_urlstring (uri)If the audio_config is passed, the URL for downloading the audio recording is returned.
download_urlstring (uri)URL where the recording can be downloaded.
download_url_expirystring (date-time)Timestamp when the download URL expires.
file_sizenumberFile size of the recording, in bytes.
invoked_timestring (date-time)Timestamp when this recording was invoked.
meetingobject
recording_durationintegerTotal recording time in seconds.
started_timestring (date-time)Timestamp when this recording actually started after being invoked. Usually a few seconds after invoked_time.
statusstringCurrent status of the recording. (INVOKED, RECORDING, UPLOADING, UPLOADED, ERRORED, PAUSED)
stopped_timestring (date-time)Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped.
storage_configobject (title: StorageConfig)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_id, app_idmeeting_id, page_no, per_page, expired, search, sort_by, sort_order, start_time, end_time, statusReturns all recordings for an App. If the meeting_id parameter is passed, returns all recordings for the given meeting ID.
pause_resume_stop_recordingreplaceaccount_id, app_id, recording_id, actionPause/Resume/Stop a given recording ID.
create_trackexecaccount_id, app_id, meeting_id, layersStarts a track recording in a meeting. Track recordings consist of "layers". Layers are used to map audio/video tracks in a meeting to output destinations. More information about track recordings is available in the Track Recordings Guide Page.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
app_idstringThe Access application ID.
recording_idstringID of the recording
end_timestring (date-time)The end time range for which you want to retrieve the meetings. The time must be specified in ISO format.
expiredbooleanIf passed, only shows expired/non-expired recordings on RealtimeKit's bucket
meeting_idstring (uuid)ID of a meeting. Optional. Will limit results to only this meeting if passed.
page_nonumberThe page number from which you want your page search results to be displayed.
per_pagenumberNumber of results per page
sort_bystring
sort_orderstring
start_timestring (date-time)The start time range for which you want to retrieve the meetings. The time must be specified in ISO format.
statusarrayFilter by one or more recording status

SELECT examples

Returns all recordings for an App. If the meeting_id parameter is passed, returns all recordings for the given meeting ID.

SELECT
id,
session_id,
output_file_name,
audio_download_url,
download_url,
download_url_expiry,
file_size,
invoked_time,
meeting,
recording_duration,
started_time,
status,
stopped_time,
storage_config
FROM cloudflare.realtime_kit.recordings
WHERE account_id = '{{ account_id }}' -- required
AND app_id = '{{ app_id }}' -- required
AND meeting_id = '{{ meeting_id }}'
AND page_no = '{{ page_no }}'
AND per_page = '{{ per_page }}'
AND expired = '{{ expired }}'
AND search = '{{ search }}'
AND sort_by = '{{ sort_by }}'
AND sort_order = '{{ sort_order }}'
AND start_time = '{{ start_time }}'
AND end_time = '{{ end_time }}'
AND status = '{{ status }}'
;

REPLACE examples

Pause/Resume/Stop a given recording ID.

REPLACE cloudflare.realtime_kit.recordings
SET
action = '{{ action }}'
WHERE
account_id = '{{ account_id }}' --required
AND app_id = '{{ app_id }}' --required
AND recording_id = '{{ recording_id }}' --required
AND action = '{{ action }}' --required
RETURNING
data,
success;

Lifecycle Methods

Starts a track recording in a meeting. Track recordings consist of "layers". Layers are used to map audio/video tracks in a meeting to output destinations. More information about track recordings is available in the Track Recordings Guide Page.

EXEC cloudflare.realtime_kit.recordings.create_track
@account_id='{{ account_id }}' --required,
@app_id='{{ app_id }}' --required
@@json=
'{
"layers": "{{ layers }}",
"max_seconds": {{ max_seconds }},
"meeting_id": "{{ meeting_id }}"
}'
;