Pause/Resume/Stop recording
realtime_kit.recordings.pause_resume_stop_recording(strrecording_id, RecordingPauseResumeStopRecordingParams**kwargs) -> RecordingPauseResumeStopRecordingResponse
PUT/accounts/{account_id}/realtime/kit/{app_id}/recordings/{recording_id}
Pause/Resume/Stop a given recording ID.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Parameters
Pause/Resume/Stop recording
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
response = client.realtime_kit.recordings.pause_resume_stop_recording(
recording_id="recording_id",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
app_id="2a95132c15732412d22c1476fa83f27a",
action="stop",
)
print(response.success){
"success": true,
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"audio_download_url": "https://example.com",
"download_url": "https://example.com",
"download_url_expiry": "2019-12-27T18:11:19.117Z",
"file_size": 0,
"invoked_time": "2019-12-27T18:11:19.117Z",
"output_file_name": "output_file_name",
"session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"started_time": "2019-12-27T18:11:19.117Z",
"status": "INVOKED",
"stopped_time": "2019-12-27T18:11:19.117Z",
"recording_duration": 0,
"start_reason": {
"caller": {
"name": "RealtimeKit_test",
"type": "ORGANIZATION",
"user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec"
},
"reason": "API_CALL"
},
"stop_reason": {
"caller": {
"name": "RealtimeKit_test",
"type": "ORGANIZATION",
"user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec"
},
"reason": "API_CALL"
},
"storage_config": {
"type": "aws",
"auth_method": "KEY",
"bucket": "bucket",
"host": "host",
"password": "password",
"path": "path",
"port": 0,
"private_key": "private_key",
"region": "us-east-1",
"secret": "secret",
"username": "username"
}
}
}Returns Examples
{
"success": true,
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"audio_download_url": "https://example.com",
"download_url": "https://example.com",
"download_url_expiry": "2019-12-27T18:11:19.117Z",
"file_size": 0,
"invoked_time": "2019-12-27T18:11:19.117Z",
"output_file_name": "output_file_name",
"session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"started_time": "2019-12-27T18:11:19.117Z",
"status": "INVOKED",
"stopped_time": "2019-12-27T18:11:19.117Z",
"recording_duration": 0,
"start_reason": {
"caller": {
"name": "RealtimeKit_test",
"type": "ORGANIZATION",
"user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec"
},
"reason": "API_CALL"
},
"stop_reason": {
"caller": {
"name": "RealtimeKit_test",
"type": "ORGANIZATION",
"user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec"
},
"reason": "API_CALL"
},
"storage_config": {
"type": "aws",
"auth_method": "KEY",
"bucket": "bucket",
"host": "host",
"password": "password",
"path": "path",
"port": 0,
"private_key": "private_key",
"region": "us-east-1",
"secret": "secret",
"username": "username"
}
}
}