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 started or 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
screenshotIdstringMandatoryUnique 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)
statusstringMandatoryPossible values:
"started": Screenshot has started.
"ended": Screenshot completed successfully and is available for access
"error": Screenshot was failed to complete.
errorMessagestringOptionalHuman-readable error message if status is "error".
accessUrlstringOptionalURL to access the screenshot (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_SCREENSHOT_RESULT_EVENT",
"version": "v1.0",
"timestamp": 1715568240000,
"data": {
"screenshot": "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_SCREENSHOT_RESULT_EVENT",
"version": "v1.0",
"timestamp": 1715568240000,
"data": {
"screenshotId": "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": {
"screenshotId": "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