Webhooks
A webhook can be specified with realtime message types recording_start
, session_start
, and supervisor_join_session
.
Webhooks are sent as POST requests with Content-Type: application/json.
upload_ready
The webhook specified in recording_start is called if the recording was successfully uploaded.
status
Type: STRING
Value "upload_ready".
msg
Type: STRING
Status description.
rec_id
Type: STRING
Affected recording.
client_id
Type: STRING
Affected client.
recording_started_at
Type: Time ISO8601
Server-time when the recording was started.
recording_first_frame_written_at
Type: Time ISO8601
Server-time when the first video-frame was written to the recording-file.
recording_first_peerframe_captured_at
Type: Time ISO8601
Timestamp when the first video-frame was captured at the client/peer side. This information is calculated using the RTCP synchronization info provided by the webrtc-browser-implementation.
recording_stopped_at
Type: Time ISO8601
Server-time when the recording was stopped.
recording_file_duration_ms
Type: INT
Duration of the recording file in [ms]. This is the duration according to the video-PTS written to the webm-file. This should exactly match the duration a webm-player might show.
recording_file_size_bytes
Type: INT
Size of recording file in bytes.
We think that for synchronization purposes the recording_first_peerframe_captured_at might be quite handy. Since it contains a timestamp from the client it should only be compared with timestamps originated from the client as well.
upload_failed
The webhook specified in recording_start
is called if the upload of the recording failed.
status
Type: STRING
Value "upload_failed".
msg
Type: STRING
Status description.
rec_id
Type: STRING
Affected recording.
client_id
Type: STRING
Affected client.
upload_status_code
Type: INT
Status code when upload was tried. This reflects the http status code returned when trying to upload the recording.
session_finished
The webhook specified in session_start
is called when the session has finished.
status
Type: STRING
Value "session_finished".
msg
Type: STRING
Status description.
rec_id
Type: STRING
Affected recording.
client_id
Type: STRING
Affected client.
started_at
Type: Time ISO8601
Start of this session.
stopped_at
Type: Time ISO8601
End of this session.
supervisor_session_finished
The webhook specified in supervisor_join_session
is called when the supervisor session has finished.
status
Type: STRING
Value "supervisor_session_finished".
supervisor_session_id
Type: STRING
ID of the supervisor session.
supervisor_client_id
Type: STRING
ID of the supervisor client.
agent_session_id
Type: STRING
ID of the agent sessions.
agent_client_id
Type: STRING
ID of the agent client.
started_at
Type: Time ISO8601
Start of this supervisor session.
stopped_at
Type: Time ISO8601
End of this supervisor session.