Skip to main content

Notify Screenshot Result

This document defines the specification for the SYNC_SCREENSHOT_RESULT_EVENT notification type sent by the SwiftFederation platform. This notification is triggered when a screenshot process has completed, providing details about the screenshot 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_SCREENSHOT_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_SCREENSHOT_RESULT_EVENT"

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

Field NameTypeRequiredDescription
screenshotstringMandatoryUnique identifier for the screenshot
streamIdstringMandatoryStream ID that was recorded
startedstringMandatoryscreenshot start time in ISO 8601 format (UTC)
endedstringMandatoryscreenshot end time in ISO 8601 format (UTC)
statusstringMandatoryStatus of the screenshot. Possible values:
"Ended": screenshot completed successfully and is available for access
"Error": screenshot failed to complete
"Warining": Warning was raised during the screenshot
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 screenshot 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 screenshot (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_SCREENSHOT_RESULT_EVENT",
"version": "v1.0",
"timestamp": 1715568240000,
"data": {
"screenshot": "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/screenshot/e2ca25b0c01d4c48aa77d35c62e64259/"
}
}

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_SCREENSHOT_RESULT_EVENT",
"version": "v1.0",
"timestamp": 1715568300000,
"data": {
"screenshot": "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 screenshot"
}
}

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_SCREENSHOT_RESULT_EVENT",
"version": "v1.0",
"timestamp": 1715568300000,
"data": {
"screenshot": "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 screenshot"
}
}

Response

POST HTTP/1.1 200 OK