EVENTS

Events are central to the ControlHub and are at the heart of managing both streaming and on-demand content.

Event Object

{
    "video": null,
    "id": "346eb986-1248-4391-9ebc-c1f35bb27cd8",
    "channelId": "a32a5a2d-88b5-4fae-8a1f-0fb258129def",
    "channel": "Example Channel",
    "vuflowId": "fcc587e5-0dfd-4ade-b935-d6b0904f358f",
    "vuflow": "Example Vuflow",
    "remixflowId": null,
    "remixflow": "",
    "archiverflowId": null,
    "archiverflow": "",
    "state": 11,
    "stateString": "VOD_PUBLIC",
    "mp4State": 0,
    "mp4StateString": "NONE",
    "eventTypeId": "21c2c17b-d129-4957-87c4-97ff81e0b64b",
    "eventType": "Example Event Type",
    "eventTypeColour": null,
    "roomId": null,
    "room": "",
    "channelProfileId": "26a0228e-f1b2-497d-9cb2-246ffc4d3224",
    "customPropertyConfigurationId": null,
    "title": "Example Event",
    "refId": "reference-identifier-01",
    "externalId": "external-identifier-01",
    "contentId": "346eb986-1248-4391-9ebc-c1f35bb27cd8",
    "description": null,
    "autoStart": false,
    "autoEnd": false,
    "autoPublish": false,
    "autoStartPublications": false,
    "embededVodTimestamps": true,
    "capturingLive2Vod": false,
    "externalUpdateAllowed": false,
    "displayStart": "1970-01-01T09:00:00Z",
    "displayEnd": "1970-01-01T09:30:00Z",
    "scheduledStart": "1970-01-01T09:00:00Z",
    "scheduledEnd": "1970-01-01T09:30:00Z",
    "scheduledChannelStart": null,
    "scheduledChannelEnd": null,
    "actualLiveStart": "1970-01-01T08:46:52Z",
    "actualLiveEnd": "1970-01-01T09:49:57Z",
    "publishedStart": "1970-01-01T08:46:52Z",
    "publishedEnd": "1970-01-01T09:49:57Z",
    "instantVodStart": "1970-01-01T09:00:05Z",
    "instantVodEnd": "1970-01-01T09:31:00Z",
    "captureVodStart": "1970-01-01T09:00:05Z",
    "captureVodEnd": "1970-01-01T09:31:00Z",
    "dateCreated": "1970-01-015T08:30:36Z",
    "dateModified": "1970-01-01T09:49:36Z",
    "dateDeleted": null,
    "drmJson": "{\"drm_provider\":\"NONE\"}",
    "drmData": null,
    "additionalStreamingOptions": "--archive_segment_length=600 --archiving=1 --archive_length=28800 --dvr_window_length=28800 --restart_on_encoder_reconnect --iss.minimum_fragment_length=8 --hls.minimum_fragment_length=8 --hds.minimum_fragment_length=8 --hls.client_manifest_version=4 --hls.no_audio_only --hls.no_multiplex",
    "dvrLength": 28800,
    "dvrLengthUrlParam": 28800,
    "maxBitrateUrlParam": null,
    "minBitrateUrlParam": null,
    "vodDrm": false,
    "taskEngineJson": null,
    "thumbnail": null,
    "thumbnailUrl": null,
    "documentUrl": "https://vis.example.vualto.com/api/document/event/346eb986-1248-4391-9ebc-c1f35bb27cd8",
    "tagUrl": "https://vis.example.vualto.com/api/tag/event/346eb986-1248-4391-9ebc-c1f35bb27cd8",
    "customProperties": [],
    "categories": [],
    "category": "EXCAT1, EXCAT2",
    "categoryId": null,
    "remixDrmJson": null,
    "remixDrmData": null,
    "remixDrm": false,
    "archiverCaptureId": null,
    "archiverProfileId": null,
    "archiverStart": null,
    "archiverEnd": null
}

Notes: See the respective pages for the structure of Categories and CustomProperties. CategoryId will not be specified if there are multiple Categories set. Category will contain all the Category Labels for this Event - if they are set.

Video Structure:

An Event object often specifies a Video object, which contains information on the streaming URLs and protocols.

Below is an example indicating a typical structure. Depending on the Event State different URL objects are populated, but the structure within each is similar.

Other infrastructure information is also included, such as rampServers, and this is defined by the selected Channel and it’s configuration.

{
  "video": {
        "webPageUrl": "url-here",
        "playerUrl": "url-here",
        "embedCode": "iframe-here",
        "scriptablePlayerUrl": "url-here",
        "scriptableEmbedCode": "embed-code-here",
        "requestedInPoint": null,
        "requestedOutPoint": null,
        "requestedAudioOnly": false,
        "requestedAutoStart": false,
        "liveUrls": [
            {
                "streamProtocol": 0,
                "streamProtocolString": "HLS",
                "url": "url-here",
                "absoluteUrlWithPathNoQuery": "url-here",
                "streamSource": 0,
                "streamSourceString": "CDN_PRIMARY_INDEX_0"
            }
        ],
        "livePlayoutProfileUrls": {},
        "vodUrls": [],
        "currentStateUrls": [
            {
                "streamProtocol": 0,
                "streamProtocolString": "HLS",
                "url": "url-here",
                "absoluteUrlWithPathNoQuery": "url-here",
                "streamSource": 0,
                "streamSourceString": "CDN_PRIMARY_INDEX_0"
            }
        ],
        "archiverCapturePublishingPointUrls": [],
        "websiteplayerUrl": "url-here",
        "websiteEmbedCode": "",
        "scriptableWebsitePlayerUrl": "url-here",
        "scriptableWebsiteEmbedCode": "",
        "publishingPointUrls": [
            {
                "url": "url-here",
                "state": "state-here",
                "hasStarted": false,
                "lastUpdated": "iso8601-datetime-here",
                "receivingData": false
            }
        ],
        "rampServers": [
            {
                "serverAddress": "address-here",
                "apiKey": "api-key-here",
                "location": "location-here",
                "proxyPass": "url-here",
                "playerAddress": "address-here",
                "proxyPassEmpty": "url-here"
            },
        ],
        "remixUrls": [],
        "archiverUrls": []
    }
}

Note: when requesting many Event objects, the video object is not generated to improve performance.


Event Collection

Certain endpoints will return an Event collection, which includes pagination information. Shown below, the results propery contains an array of Event objects.

{
  "pageSize": 10,
  "totalCount": 3,
  "results": [
    {},
    {},
    {}
  ]
}

Supported Actions

POST /event/

Add or Update an Event.

Request Body:

Below are the parameter values that can be provided when adding/updating an Event.

It is recommended to submit this as JSON though, as elements such as tags are an array of objects.

  Id: {Guid} 

  Title: {string}

  RefId: {string}

  ExternalId: {string}

  ScheduledStart: {ISO8601 string}

  ScheduledEnd: {ISO8601 string}

  PublishedStart: {ISO8601 string}

  PublishedEnd: {ISO8601 string}

  RoomId: {Guid}

  EventTypeId: {Guid}

  CategoryId: {Guid}

  ChannelId: {Guid}
  
  AutoStart: {bool}

  AutoEnd: {bool}

  AutoPublish: {bool}

  AutoStartPublications: {bool}

  Tags: {array of TagModel} - see below for the structure.

  DrmJson": {escaped JSON string}

  AdditionalStreamingOptions": {string}

  EventState: {EventState}

  TaskEngineJson: {string}

  VuflowId: {Guid}

  DvrLength: {int}

  MaxBitrate: {int}

  MinBitrate: {int}

  VodEnableDrm: {bool}

  Thumbnail: {string}

  InstantVodStart: {ISO8601 string}

  InstantVodEnd: {ISO8601 string}

  RemixflowId: {Guid}

  CustomPropertyConfigurationId: {Guid}

  ArchiverflowId: {Guid}

  ArchiverStart: {ISO8601 string}

  ArchiverEnd: {ISO8601 string}

  RefreshIndex: {bool}
  
  AutoExpirePublishingPoints {bool} - Will auto restart the event if all publihsingpoint fail. Default is false.

Note: id is required when updating a specific Event, but optional when adding.

Note: all ISO8601 strings can be provided as null if desired.

TagModel Structure:

{
  "id": "d78a3df6-98d2-49d0-b7fa-0f489d2dc3f2",
  "name": "my-tag"
}

Unescaped DrmJson Example:

{
  "drm_provider": "THIRDPARTY",
  "drm_data": [
    {
      "name": "CENC",
      "key_id": "key-id-here",
      "content_id": "content-id-here",
      "widevine_drmspecific": "",
      "widevine_laurl": "widevine-laurl-here",
      "key_iv": "",
      "playready_laurl": "playready-laurl-here"
    },
    {
      "name": "FAIRPLAY",
      "key_id": "key-id-here",
      "key_iv": "key-iv-here",
      "laurl": "fairplay-laurl-here"
    }
  ]
}

Response: 200 OK


PATCH /event/{id}

Patch update an event by its ID.

Content Type

application/json-patch+json

Request Body:

[
  {
    "op": "replace",
    "path": "/Title",
    "value": "My event title"
  }
]

Response: 200 OK


PATCH /event/reference/{referenceid}

Patch update an event by its references ID.

Content Type

application/json-patch+json

Request Body:

[
  {
    "op": "replace",
    "path": "/DrmJson",
    "value": "{\r\n  \"drm_provider\": \"THIRDPARTY\",\r\n  \"drm_data\": [\r\n    {\r\n      \"name\": \"CENC\",\r\n      \"key_id\": \"key-id-here\",\r\n      \"content_id\": \"content-id-here\",\r\n      \"widevine_drmspecific\": \"\",\r\n      \"widevine_laurl\": \"http://widevine.entitlement.theplatform.eu/wv/web/ModularDrm/getWidevineLicense\",\r\n      \"key_iv\": \"\",\r\n      \"playready_laurl\": \"https://green.playready.entitlement.theplatform.eu/playready/rightsmanager.asmx?cfg=(kid:120b4b3b4300b8cc753f8dd1cbfcd563,contentkey:NmQ2NGNlNjExNzc1YjIxOTk4N2VkMTU4ZGI3NDZiZDg=,ckt:aesctr)\"\r\n    },\r\n    {\r\n      \"name\": \"FAIRPLAY\",\r\n      \"ask\": \"\",\r\n      \"key_id\": \"key-id-here\",\r\n      \"key_iv\": \"keyiv-here\",\r\n      \"laurl\": \"skd://fairplay.entitlement.theplatform.eu/fpls/web/FairPlay\"\r\n    }\r\n  ]\r\n}"
  }
]

Response: 200 OK


POST /event/stream/dvrwindowlength/{id}

Update the DVR Window Lenth for the associated live stream to the given Event Id.

Request Body:

  DvrWindowLength: {int}

Response: 200 OK


POST /event/vuflow/add/

Adds a Vuflow task to an Event (or creates and Event for one if necessary).

Request Body:

TaskEngineJson: {string} - Required. Specify the task you wish to run. 
Id: {Guid} - Optional. Specify an existing ID to set the task on this Event.
EventState: {EventState} - Optional. Specify the state you wish to transition the Event into.
Mp4State: {Mp4State} - Optional. Specify the MP4 state you wish to set on the Event.
RefreshIndex: {bool} - Optional. Specify if you wish to refresh any indexing for this Event.

Response: 200 OK


PUT /event/{id}/externalupdate/{flag}

Set ExternalUpdate to a given value.

Response: 200 OK


PUT /event/forcestop/{id}

Use this method to force an event into a stopped state. This function will also force stop the encoder channel running - bypassing the concurrency lock mechanism and removing any existing locks. Should be used as a last resort in case the lock synchronisation becomes out of sync.

Warning: Potentially dangerous as no checks will be made to see if a different Event is running on the associated Channel.

Response: 200 OK


PUT /event/state/{id}

Update the Event state.

Send 1 (LIVE_UNPUBLISHED) or 2 (LIVE_PUBLISHED) to start the encoder.

Send 4 (STOPPED) to stop the encoder.

See Event States for more information.

Response: 200 OK


PUT /event/vuflow/protection/{contentId}

Update the Event state with protection level checks.

Typical usage is to change between VOD_PUBLIC and VOD_PRIVATE.

Request Body:

  Protection: {EventState} - the state to change to.

Response: 200 OK


GET /event/

Get Events, filtered by given parameters.

Query Parameters:

From:       {string} - ISO8601 DateTime string to include Events scheduled from the given Date.

To:         {string} - ISO8601 DateTime string to include Events scheduled until the given Date.

ModifiedFrom    {string} - ISO8601 DateTime string to include Events which have been modified since the given Date.

ModifiedTo  {string} - ISO8601 DateTime string to include Events which have been modified up to the given Date.

EventState: {string} - Comma separated string including EventStates to include.

PageSize:   {int} - Number of results to consider in a page.

PageNumber: {int} - Number of the page you are requesting.

Room:       {string} - Name of the Room to filter Events on.

EventType   {string} - Name of the EventType to filter Events on.

Tags:       {string} - Comma separated string including Tags to check for on the Events.

Order:      {QueryOrder} -ASC or DESC.

SkipEvents: {string} - Comma separated GUIDs to skip or ignore in the results.

NoCache:    {bool} - Default False. Set to True to bypass cache.

Category:   {string} - Name of the Category to filter Events on.

Channel:    {string} - Name of the Channel to filter Events on.

OrderColumn:    {string} - Name of the column to order on (see supported list below).

Search:         {string} - String to search Event properties for.

NoScheduledEnd: {bool} - Set to True to only return Events with no scheduled end.

ContainsVuflow: {bool} - Set to True to filter to Events with a Vuflow.

PublishingpointsMethod {PublishingpointsMethod} - Set the method to get the publihsingpoints. "ALL_AVAILABLE" will remove duplictaes and return all, in one call. "SAME_AS_STREAM_SOURCE" will return only those for this stream source.

Supported Order Columns:

Title
State
DisplayLiveStart
DisplayLiveEnd
EventType
Room
Channel
Vuflow
RefId
ExternalId

Note: all parameters are optional.

Response: 200 OK with an Event collection.


GET /event/deleted/

Get deleted Events, filtered by given parameters.

Query Parameters:

From:       {string} - Optional.

To:         {string} - Optional.

EventState: {string} - Optional. Comma separated list of Event states.

Response: 200 OK with an Event collection.


GET /event/{id}

Get Event by Id.

Query Parameters:

In:       {string} - ISO8601 DateTime string to be the streaming In point.

Out:      {string} - ISO8601 DateTime string to be the streaming Out point.

AudioOnly:    {bool}

AutoStart:    {bool}

ProcessVideo: {bool} - Set to True to return video data.

ViewUnpublished: {bool} - Set to True to return video data which allows viewing of LIVE_UNPUBLISHED.

NoCache: {bool} - Set to True to bypass cache.

StreamSource: {StreamSource} - Specify the StreamSource for fetching from Origin.

Note: all parameters are optional.

Response:

200 OK and JSON containing the Event object.

or

204 No Content if no Event was found.


GET /event/reference/{referenceId}

Get Event by Reference Id.

Response:

200 OK and JSON containing the Event object.

or

204 No Content if no Event was found.


GET /event/external/{externalId}

Get Event by External Id.

Response:

200 OK and JSON containing the Event object.

or

204 No Content if no Event was found.


GET /event/external/unique/{externalId}

Check if a given ExternalId is in use or not.

Response: 200 OK and the following JSON content:

{
  "IsUnique": true,
  "Value": "externalId-value-here",
  "ValueType": "External ID"
}

GET /event/reference/unique/{referenceId}

Check if a given ReferenceId is in use or not.

Response: 200 OK and the following JSON content:

{
  "IsUnique": true,
  "Value": "referenceId-value-here",
  "ValueType": "Reference ID"
}

GET /event/{id}/externalupdate/

Check if the given Event has externalupdate allowed or not.

Response: 200 OK and the following JSON content:

{
  "Id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
  "ExternalUpdateAllowed": true
}

GET /event/channel/{id}

Gets the currently running Event for a specific Channel Id.

Response: 200 OK and JSON containing the Event object.


GET /event/clone/{id}

Clone the given Event to create a new one.

Query Parameters:

IgnoreCustomProperties: {bool} - Optional. Defaults to False.

IgnoreChapterPoints: {bool} - Optional. Defaults to False.

IgnoreChannelProfile: {bool} - Optional. Defaults to False. 

IgnoreDocuments: {bool} - Optional. Defaults to False.

IgnorePlayoutProfiles: {bool} - Optional. Defaults to False.

Response: 200 OK and JSON containing the Event object.


GET /event/restore/{id}

Restore the Event from a soft-deletion state.

Response: 200 OK


DEL /event/{id}

Delete an Event by Id.

Query Parameters:

HardDelete: {bool} - Optional. Defaults to false. Set to true to remove all data from the database & servers.

Response: 200 OK


POST /event/clearcache/

Clear the cache for a given Event Id.

Request Body:

EventId: {Guid} - Required. The Id of the Event to remove associated cache for.

Response: 200 OK


GET /event/playoutprofiles/{id}

Gets the Live Playout Profiles associated with the Event with the specified ID. Requires the Live Playout Profile Get permission.

Query Parameters

Name Type Required
idsOnly bool No (default: false)

Responses

Scenario Code Body
idsOnly=false 200 Array of Live Playout Profile objects
idsOnly=true 200 Array of GUID strings

Example Request

/event/playoutprofiles/50e894a0-770f-4b10-843b-9a7340f84655

Example Response

[
    {
        "id": "a782bfee-5609-40da-94b6-8e92295c8da4",
        "configurationJson": "{\"manifestFile\":\"clear_profile.isml\", ...}",
        "name": "Clear Profile"
    },
    {
        "id": "053ee005-13ba-4278-b36a-c75c835cfb80",
        "configurationJson": "{\"manifestFile\":\"drm_profile.isml\", ...}",
        "name": "DRM Profile"
    }
]

POST /event/playoutprofiles/{id}

Sets the Live Playout Profiles to associate with the Event with the specified ID. If the Event is in any one of the Playout States, then a origin manifest sync operation is performed on the Event Channel’s origin server(s) to create/update/remove playout manifests for the new Live Playout Profile collection. Requires the Live Playout Profile Edit permission.

Request Body

An array of GUID strings of the Live Playout Profiles to associate with the event.

Responses

Scenario Code Body
Success 200 Array of Origin Manifest Sync Result objects

Example Request

/event/playoutprofiles/50e894a0-770f-4b10-843b-9a7340f84655

[
    "9dbabcc5-5802-4b78-af68-85e26e87bdff",
    "232912a3-8a5b-4c23-980c-73238d5b39fd"
]

Example Response

[
    {
        "profileId": "9dbabcc5-5802-4b78-af68-85e26e87bdff",
        "eventId": "50e894a0-770f-4b10-843b-9a7340f84655",
        "success": true
    },
    {
        "profileId": "232912a3-8a5b-4c23-980c-73238d5b39fd",
        "eventId": "50e894a0-770f-4b10-843b-9a7340f84655",
        "success": false,
        "errors": [
            "Example error"
        ]
    }
]