Sending Contextual Segments with the Asset Push API

Overview: The Push Asset Endpoint can also be used to send contextual segments.

This documentation is extension of the documentation on the Asset Push API. Please refer to those docs for the initial set. 

Requirements

Before sending contextual segments, please ensure the following: 

  • You are contracted and set up as a data partner with IRIS.TV.
  • You have uploaded your contextual taxonomy to IRIS.TV.

Push API Request with Contextual Segments

This follows the same API requirements with two changes:

  • The requester sends "context" along with the asset metadata. These context values should be formatted the same as the Data Partner KVPs in your contextual taxonomy.
  • The API response contains "context" and "unmatched_segments" fields. The "context" field will return the encoded values for the KVPs passed in the "context" push request.

The Push API only accepts segments that have already been added to your contextual taxonomy. Any unknown segments will be returned in the "unmatched_segments" field

Example Request and Response with Contextual Segments


REQUEST:

HTTP POST  https://api.iris.tv/publisher/asset?access_token=<access-token>&client_token=<client-token>

Content-Type: application/json\
{

"guid": 5331690110001, 
"title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit", 
"description": "Donec congue orci vel ante posuere consectetur. Vestibulum vel eros velit. In suscipit arcu nec lectus posuere sagittis.",
"dates"   :  {
            "publish_date" : 1487717574502,
            "original_air_date" :1487717574502,
            "update_date" :  1487717955852,
            "expiration_date" :  1487717955852
            },      
 "url" : {
           "asset_url" : "http://media.matrix.com/videos/video_mp4/3200k/p30695rq216952rpnn.mp4",
           "thumbnail_url" :  "http://media.matrix.com/videos/thumbnails/p30695rq216952rpnn.jpg",
           "transcript_url":  "http://media.matrix.com/videos/transcript/p30695rq216952rpnn.txt",
         },
 "show": {
           "genre" :"Sports",
           "name" : "The Show",
           "season_num" : 2,
           "episode_num" : 3,
           }, 
"language" : English
"tags": [ 
         "alex rodriguez",  
         "new york yankees",  
         "mlb"   
        ],  
"duration": 30805, 
"economics": "AD_SUPPORTED", 
"categories": [ 
               "Baseball"  
             ],  
"itemState": "ACTIVE",
"Segments": ["segment_1", "segment_2", "segment_3"]
}
}

 

RESPONSE:

200 HTTP OK
{
  "success": true,
  "video_info": {
      "iris_id": "iris_0130lafamfmmla",
      "context": [
          "ic_90831",
          "ic_90832"
      ]
  },
  "unmatched_segments": [
      "segment_3"
  ]
}