Live Event Status Reporting

Receive HTTP notifications describing a live event's state changes, with authentication and payload reference.

Major events (e.g., creating, starting, and stopping a live event) are tracked for each live event. Our service can report these events as JSON data to a web server through HTTP POST requests. Your web server may then log this data and perform custom actions in response to specific types of events.

Post a Live Event's Status Information to Your Web Server

  1. Navigate to the Live Events page.

    • From the main menu, navigate to Settings > Live Events.
  2. Under the Event Callback URL section, type the URL to which HTTP POST requests will be submitted.

  3. Optional: Choose how you will authenticate requests posted to your web server under the Webhook Secret Token section.

    • No Authentication: Verify that None is selected.

    • Token or Signature Authentication: Perform the following steps:

      • Token Authentication:
        • Select X-Edg-Auth-Token.
        • This mode ensures that each live event status request sent from our service to your web server includes an X-Edg-Auth-Token header set to your secret key.
      • Signature Authentication:
        • Select X-Edg-Signature-256.
        • This mode ensures that each live event status request sent from our service to your web server includes an X-Edg-Signature-256 header set to an encrypted value that represents the request's payload.
    • Click Generate Secret.

    • Click Copy.

    • Store your secret key in a secure location.

    • Access to a secret key is limited to when it is generated. If you lose your secret key, you will need to generate a new one and update your server-side authentication script to reference it.

    • Click Ok.

  4. Click Test to submit a test request to your web server. Verify that your web server received the request.

  5. Click Save.

Authentication

Verify that a request came from our service through either of the following authentication methods:

  • Token: This mode requires our service to include the X-Edg-Auth-Token header with each request it sends to your web server. This header is set to your secret key. You will need to implement a server-side script that compares your secret key to the X-Edg-Auth-Token header.

    Sample validation function

    SECRET = '1234567890abcdefghijklmnop' # Replace with your secret key.
    ...
    
        def validate_authentication_token(self, content, callback):
            header_sig = self.headers.get(TOKEN_TYPE_AUTH_TOKEN)
            if SECRET == header_sig:
                callback(content, TOKEN_TYPE_AUTH_TOKEN)
  • Signature: Recommended. This mode requires our service to include the X-Edg-Signature-256 header with each request it sends to your web server. This header is set to a signature that is calculated by encrypting the request's payload using a hash-based message authentication code (HMAC-SHA256) and your secret key. You will need to implement a server-side script that calculates this signature and compares it to the X-Edg-Signature-256 header.

    Sample validation function

    SECRET = '1234567890abcdefghijklmnop' # Replace with your secret key.
    ...
        def validate_signature_256(self, content, callback):
            msg = b64encode(zlib.compress(content.encode('utf8'), 9)).strip()
            sig = hmac.new(SECRET.encode('utf-8'), msg, hashlib.sha256).hexdigest()
            header_sig = self.headers.get(TOKEN_TYPE_SIGNATURE_256)
            if sig == header_sig:
                callback(content, TOKEN_TYPE_SIGNATURE_256)

Below is sample code that instantiates a sample web server and contains functions through which you authenticate a token or a signature:


Request Body

The HTTP POST request body will contain the following properties:

PropertyTypeDescription
eventStringDescribes the event that took place.
📘

An HTTP POST request will be submitted to your web server for each event.

Learn more.
event_descStringIdentifies a live event by its description.
event_idStringIndicates the system-defined ID for the event that took place.
external_idStringIdentifies the asset associated with this event by its external ID.
metadataObjectContains a key-value pair for each metadata field associated with the event.
stateStringIndicates the state of the live event at the point in time at which the event took place.
Valid values are:
pre | live | resume | post | complete
Learn more.
testing_completeIntegerIndicates the date and time at which live event testing was completed. A null value is reported when live event testing had not been completed at the point in time at which the event took place.
testing_startIntegerIndicates the date and time at which live event testing was started. A null value is reported when live event testing had not been started at the point in time at which the event took place.
timestampIntegerIndicates the date and time, in Unix time (milliseconds), at which the event took place.
user_idStringIndicates the system-defined ID associated with the user account that triggered the event.
Find user ID:
  1. Load the User Settings page.
  2. Your user ID is listed under the User ID label.
usernameStringIndicates the email address associated with the user account that triggered the event.

State

Live event states are defined below.

ValueDescription
preIndicates that the live event had not started.
liveIndicates that the live event was in progress.
resumeIndicates that the both of the following conditions were true:
  • The live event had completed.
  • The capability to resume a live event via the Live Events Dashboard was available. This capability is controlled by whether a resume event buffer has been defined.
postIndicates that the live event had completed and post-processing (e.g., creating on-demand content from a live event) was initiated.
completeIndicates that the live event had completed and all post-processing tasks were completed.

Events

Events are defined below.

ValueDescription
Added MetadataIndicates that metadata was added to a live event.
Added SlicerIndicates that a Live Slicer was added to a live event.
Added Test PlayerIndicates that a test player was added to a live event.
Auto Event Mode CancelledIndicates that a live event's auto start/stop mode was turned off.
Auto Event Schedule ClearedIndicates that a live event's scheduled start/stop time was cleared.
Auto Event Slicer Scheduling ErrorIndicates that there was an issue scheduling a Live Slicer for a live event that was configured to automatically start.
Completed TestIndicates that an operator completed testing a live event.
Error Scheduling Slicers For Auto StopIndicates that there was an issue scheduling one or more Live Slicer(s) for a live event that was configured to automatically stop.
Event Copied from {Event ID}Indicates that a live event was duplicated from an existing live event. The term {Event ID} identifies the ID of the live event that was copied.
Event CreatedIndicates that a live event was created.
Event DeletedIndicates that a live event was deleted. This deletion may have been performed manually or automatically upon its expiration.
Event EndedIndicates that an operator ended a live event.
Event Ended: Resume AvailableIndicates that an operator ended a live event that could have been resumed.
Event Marker Set: {Marker Type}:{Marker Name}Identifies the marker that was applied to the live event.
Event ResumedIndicates that an operator resumed a live event.
Event StartedIndicates that an operator started a live event.
Event UpdatedIndicates that a live event was updated.
Event VOD over max duration (8 hours)Indicates that a live event's duration exceeded 8 hours and therefore resulted in the creation of multiple CMS assets.
📘

On-demand playback of a long live event requires that your media player(s) support multi-beam playback.

Started TestIndicates that an operator started testing a live event.
Switched to SourceIndicates that the audio/video feed was switched over to different source content via the Switcher pane. The term Source identifies the live event's new source (i.e., Live Slicer, ad, and slate).
Non-Slate Syntax: Switched to {Source}
Slate Syntax:
Switched to slate [in VOD] {Mid-Event Slate Asset}
📘

The in VOD phrase indicates that slate was inserted using the

Save to Replay

option.

Learn more.
VOD Asset Auto-ExpiredIndicates that an expired CMS asset was deleted.
VOD Asset DeletedIndicates that a CMS asset was manually deleted.
VOD AvailableIndicates that a CMS asset containing the audio/video feed for a completed live event was created.

Sample Request Body

Updating a live event configuration will trigger Live Event Status Reporting. A sample request body for this type of event is provided below.

{
    "username": "[email protected]",
    "user_id": "abcdefghijklmnopqrstuvwxyz123456",
    "external_id": "",
    "event_id": "1d6f7eb5fe474312947e73ccc1c57e32",
    "timestamp": 1572293065429,
    "event_desc": "My Live Event",
    "state": "pre",
    "testing_complete": null,
    "testing_start": null,
    "event": "Event Updated",
    "metadata": {
        "key2": "value2",
        "key1": "value1"
    }
}

Did this page help you?