Skip to main content

Notify Stream Status

This document defines the specification for the SYNC_STREAM_STATUS_EVENT notification type sent by the SwiftFederation platform. This notification is triggered when a live stream starts streaming, or interrupts, or ends, or raised an error, providing details about the stream status.

Basic Information

  • Notification Type: SYNC_STREAM_STATUS_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 Notification Callbacks Specification, with the following specific values:

X-Notification-from: LLS

Request Body

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

type: "SYNC_STREAM_STATUS_EVENT"

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

Field NameTypeRequiredDescription
streamIdstringMandatoryNotification ID
domainstringMandatoryIngest domain name
appstringMandatoryApplication name
streamstringOptionalStream name
timestampstringMandatoryUTC Timestamp. Format is yyyyMMdd'T'HHmmss'Z'. E.g. 20250518T173013Z
statusstringMandatoryStatus of the stream. Possible values:
"started": The stream starts streaming
"ended": The stream interrupts
"error": An error is raised during the streaming
detailstringOptionalEvent details, including client IP address to streaming status, error message to error status, etc.

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_STREAM_STATUS_EVENT",
"version": "v1.0",
"timestamp": 1715568240000,
"data": {
"streamId": "djcoiw928f92e8ujv209ef902",
"app": "LiveStreaming",
"stream": "news_feed_1",
"timestamp": "20250518T173013Z",
"status": "started",
"detail": "Client 192.168.1.45 started streaming"
}
}

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_STREAM_STATUS_EVENT",
"version": "v1.0",
"timestamp": 1715574240000,
"data": {
"streamId": "djcoiw928f92e8ujv209ef902",
"app": "LiveStreaming",
"stream": "news_feed_1",
"timestamp": "20250518T183013Z",
"status": "ended",
"detail": "Client 192.168.1.45 ended streaming"
}
}

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_STREAM_STATUS_EVENT",
"version": "v1.0",
"timestamp": 1715568300000,
"data": {
"streamId": "djcoiw928f92e8ujv209ef902",
"app": "LiveStreaming",
"stream": "football_match",
"timestamp": "20250515T031532Z",
"status": "error",
"detail": "Failed to output due to an internal error"
}
}

Response

POST HTTP/1.1 200 OK