Skip to main content

Notify Recording Result

This document defines the specification for the SYNC_RECORDING_RESULT_EVENT notification type sent by the SwiftFederation platform. This notification is triggered when a recording process has completed, providing details about the recording status and access information.

Note: This notification follows the standard structure defined in the Notification Callbacks Specification. Please refer to that document for common headers, response requirements, and retry policies.

Basic Information

  • Notification Type: SYNC_RECORDING_RESULT_EVENT
  • X-Notification-from: LLS
  • Version: v1.0

Endpoint

A HTTP endpoint that can accept POST requests of LLS notifications. It should be setup by you and configured in LLS console advance. All of the following examples will use https://api.example.com/notification as the endpoint.

Request

Request Headers

This notification uses the standard headers as defined in the Common Request Specification, with the following specific values:

X-Notification-from: LLS

Request Body

This notification follows the standard request body structure as defined in the Common Request Specification, with the following specific values for common fields:

type: "SYNC_RECORDING_RESULT_EVENT"

The data object contains the following fields specific to this notification type:

Field NameTypeRequiredDescription
recordingstringMandatoryUnique identifier for the recording
streamIdstringMandatoryStream ID that was recorded
startedstringMandatoryRecording start time in ISO 8601 format (UTC)
endedstringMandatoryRecording end time in ISO 8601 format (UTC)
statusstringMandatoryStatus of the recording. Possible values:
"Ended": Recording completed successfully and is available for access
"Error": Recording failed to complete
"Warining": Warning was raised during the recording
errorMessagestringOptionalHuman-readable error message if status is "Warning" or "Error".
Possible error codes:
"STREAM_NOT_FOUND": The specified stream was not found
"STORAGE_FAILURE": Failed to store the recording due to storage issues
"NETWORK_ERROR": Network connectivity issues during uploading
"ENCODING_ERROR": Problems with encoding the stream
"INTERNAL_ERROR": Internal system error
accessUrlstringOptionalURL to access the recording (only provided if status is "Ended")

Example

Notification example: Ended

Request

POST https://api.example.com/notification HTTP/1.1

Content-Type: application/json
X-SFD-Notification-From: LLS
{
"id": "notif-123adb789efg",
"type": "SYNC_RECORDING_RESULT_EVENT",
"version": "v1.0",
"timestamp": 1715568240000,
"data": {
"recording": "uuid-abc123-def456-ghi789",
"streamId": "123adb789efg",
"started": "2025-05-15T02:00:00Z",
"ended": "2025-05-15T02:30:00Z",
"status": "Ended",
"accessUrl": "https://c120.oss.testing.swiftserve.com/100bucket/examples/120/0512rtmp002/dvr/e2ca25b0c01d4c48aa77d35c62e64259/manifest.m3u8"
}
}

Response

POST HTTP/1.1 200 OK

Notification example: Error

Request

POST https://api.example.com/notification HTTP/1.1

Content-Type: application/json
X-SFD-Notification-From: LLS
{
"id": "notif-9876543210",
"type": "SYNC_RECORDING_RESULT_EVENT",
"version": "v1.0",
"timestamp": 1715568300000,
"data": {
"recording": "uuid-xyz987-uvw654-rst321",
"streamId": "123adb789efg",
"started": "2025-05-15T03:00:00Z",
"ended": "2025-05-15T03:15:32Z",
"status": "Error",
"errorMessage": "Connection to stream source lost over 5 times during recording"
}
}

Response

POST HTTP/1.1 200 OK

Notification example: Warning

Request

POST https://api.example.com/notification HTTP/1.1

Content-Type: application/json
X-SFD-Notification-From: LLS
{
"id": "notif-9876543210",
"type": "SYNC_RECORDING_RESULT_EVENT",
"version": "v1.0",
"timestamp": 1715568300000,
"data": {
"recording": "uuid-xyz987-uvw654-rst321",
"streamId": "123adb789efg",
"started": "2025-05-15T03:00:00Z",
"ended": "2025-05-15T03:15:32Z",
"status": "Warning",
"errorMessage": "Stream not found during recording"
}
}

Response

POST HTTP/1.1 200 OK