Video Asset Notifications API

The following explains how publishers can register to receive notifications when an asset is updated with new contextual segments.

Video Asset Notifications API Steps:

Please follow the below steps to begin receiving notifications for videos being categorized in the IRIS.TV platform:

  1. Register a URL with Video Asset Notifications API

  2. IRIS.TV will send notifications of asset updates to the registered URL

  3. Publisher retrieves asset updates via the Context API route

The publisher will only receive updates when enrichment is added for a given video. Publisher’s should still run their first Context API check to pull the iris_id before enrichment is added.

Registering a URL for Notifications

First, you will register a URL through the Video Asset Notifications API.

Required parameters:

  • access_token: token assigned to the publishers parent account (parent media company)

  • client_token: token assigned to the publishers child account (site, app or channel)

  • url: URL that will receive notifications from IRIS API

Video Asset Notifications API Sample URL:

curl -X POST https://api.iris.tv/register_push_notifications?access_token=90814301lkjafalkj&client_token=PAJEU091&url=https://sample.url.com

If successful, the Video Asset Notifications API will respond:

{
"success": true,
"url": "[echo or URL in request]"
}

If there’s a URL already registered for the publisher, Video Asset Notifications API will respond with a 400 and the following message:

{"msg":"A url is already registered. Please contact IRIS.TV"} 

Publishers can only have one registered URL at a time.

Once a URL is registered for the client token, it cannot be reset via the API. Please reach out to you IRIS.TV Technical Account Manager to reset the URL.

Receiving Notifications

Once a URL is set, Video Asset Notifications API will send update notifications whenever that asset is updated with new enrichment. The message in the notifications will have two parameters:

  • event: defines change to the asset. All events for this workflow will be asset-update

  • platform_id: the reference ID (GUID) for the asset from the publisher’s CMS

A sample of the notification:

{ 
"event": "asset-update",
"platform_id":"6026444633001"
}

Please ensure your URL is set up to allow POST notifications.

After Receiving a Notification

Once a notification is received, please follow the IRIS.TV Context API docs to retrieve the newest metadata on the asset.