Overview: Below is information pertaining to how publishers can integrate with the Context API. The Context API can be used for activating contextual data across any web and non-web environments, including apps for any CTV/OTT devices. The Context API can also be utilized for both client and server-side integrations making it CSAI or SSAI compatible.

Prerequisites

Before implementing the Context API, the following needs to be completed:

This workflow requires three values:

Building the Integration

The order of operations for retrieving the context or category information should be as follows:

  1. Call the IRIS.TV Context API to retrieve contextual segments for the next asset in the queue.

  2. Add the context segment to the pre-roll ad tag for that video asset.

This process should be repeated as you iterate through the playlist.

Formatting the API Call

The API call requires the client token, platform id, and access token. The client and access tokens will be provided after the initial ingest.

A sample of the API call:

https://context.iris.tv/video_info?access_token=90814301lkjafalkj&client_token=PAJEU091&platform_id=6026444633001

The API will respond with a video_info field that includes:

A sample of the API response:

{
  "success": true,
  "video_info": {
    "iris_id": "iris_098eiman91",
    "context": [
      "context_1", 
      "context_2", 
      "context_3"
    ],
    "iris_id_expires_at": 1588636800
  }
}

Note: The Context field will be used for all IRIS.TV Contextual Video Marketplace workflows.

After the Integration is Complete

Once the integration is complete and you’re receiving contextual segments, move on to Activating Contextual Data in order to add the data into your existing ad workflow.