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
idstringMandatoryNotification 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:
"Streaming": The stream starts streaming
"Interrupted": 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: Streaming

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": {
"channel": "MRTV_NEWS",
"app": "LiveStreaming",
"stream": "news_feed_1",
"timestamp": "20250518T173013Z",
"status": "Streaming",
"detail": "Client 192.168.1.45 started 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": {
"id": "123adb789efg",
"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

Notification example: Interrupted

Request

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

Content-Type: application/json
X-SFD-Notification-From: LLS
{
"id": "notif-5678901234",
"type": "SYNC_STREAM_STATUS_EVENT",
"version": "v1.0",
"timestamp": 1715568400000,
"data": {
"channel": "NEWS_24",
"app": "LiveStreaming",
"stream": "breaking_news",
"timestamp": "20250515T030512Z",
"status": "Interrupted",
"detail": ""
}
}

Response

POST HTTP/1.1 200 OK