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 started or 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 Name | Type | Required | Description |
|---|---|---|---|
| recordingId | string | Mandatory | Unique identifier for the recording |
| streamId | string | Mandatory | Stream ID that was recorded |
| started | string | Mandatory | Recording start time in ISO 8601 format (UTC) |
| ended | string | Optional | Recording end time in ISO 8601 format (UTC) |
| status | string | Mandatory | Status of the recording. Possible values: • "started": Recording has started.• "ended": Recording completed successfully and is available for access• "error": Recording failed to complete. |
| errorMessage | string | Optional | Human-readable error message if status is "error". |
| accessUrl | string | Optional | URL to access the recording (only provided if status is "ended") |
Example
Notification example: Started
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": {
"recordingId": "uuid-abc123-def456-ghi789",
"streamId": "123adb789efg",
"started": "2025-05-15T01:00:00Z",
"status": "started"
}
}
Response
POST HTTP/1.1 200 OK
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": {
"recordingId": "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": {
"recordingId": "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