IRIS.TV Context API
The following explains how publishers can integrate the Context API.
The Context API can be used for retrieving contextual data across from IRIS.TV, across all devices and formats. The Context API can also be installed in either client or server-side making it CSAI or SSAI compatible.
Installing Context API Call
Calling the API
The Context API call requires two parameters for authentication. Identifying the video can be done (a) sending multiple content identifiers from the ad request to the Context API requests or (b) querying for a specific video ID.
The parameters required for authentication are:
- 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)
Querying for Multiple Identifiers from the Ad Request
Send all three of the following parameters:
- content_id
- iris_content_id
- channel_name
The request should pass whatever value exists in the content_id, iris_content_id, and channel_name to its corresponding value in the IRIS Context API. From there, IRIS.TV will prioritize the signals to ensure the publisher receives the best and most accurate coverage.
If no value exists for a parameter, please do not send the parameter.
Sample Request
When an ad request has the following fields in the content object:
"content_id" : "908anm"
"iris_content_id" : "jaleu"
"channel_name" : "my_channel"
Then the Context API request should be formatted like:
https://context.iris.tv/video_info?access_token=90814301lkjafalkj&client_token=PAJEU091&content_id=908anm&iris_content_id=jaleu&channel_name=my_channel
The Context API will return information for one asset. This will be based on the following priority:
- content_id
- iris_content_id
- channel_name
Querying for a Specific Video ID
Use the following parameters to identify the video
- alt_id: Any other content identifiers that have been mapped by IRIS.TV. This includes the reference ID from your CMS.
Sample Request
Here's an example the Context API call using the alt_id here:
https://context.iris.tv/video_info?access_token=90814301lkjafalkj&client_token=PAJEU091&alt_id=6026444633001
The Context API Response
The API will respond with a video_info field that includes the following:
-
iris_id: the asset's persistent video ID assigned by IRIS.TV
-
context: the contextual data for the asset created by IRIS.TV's context ands brand-safety data partners
See a sample of the Context API response here:
{
"success": true,
"video_info": {
"iris_id": "iris_098eiman91fue7",
"context": [
"ic_1234567",
"ic_2345678",
"ic_3456789"
]
}
}
After the Integration is Complete
Once the integration is complete and you’re receiving contextual segments, move on to Activating Contextual Data to the Ad Server in order to add the data into your existing ad workflow.