Providing Feedback

To help tune recommendations, make sure to record displays and plays.

If recommendations appear in the player endscreen, you do not need to do anything. If you display the recommendations outside the player, make sure to record each display and play event.

Record a Display

[POST]/v2/discover/feedback/impression{  
   bucket_info,
   device_id
}

Record a Play

[POST]/v2/discover/feedback/play{  
    bucket_info,
    device_id
}

Properties

The following table describes the query string parameters of the routes.

Property Description Required?
bucket_info Container. The bucket_info structure returned by Ooyala Discovery for trending, related, or other recommendations.

Note: The contents of bucket_info need to be escaped in the JSON data.

Yes
device_id ID of the device or user for which you want to return recommendations.

Type: String

Default: None

Example: pmd2xzMjrCg4TpQd6cwz9HP4U-pcFSHH

Yes

Examples

Note: The 200 response that Ooyala returns for this route has no body text.

The following example records a display:

[POST]/v2/discover/feedback/impression{  
   "bucket_info":"1{ 
 \"encoded\":\"eNpNj1EOgyAQRO+y36ZBQRAuY4hsqIkoWYiJsd69tNbGz9mZeZndIVrCOfdr\\n7EcHBqTWnAvxalTNOFSA68fNW0QwdQURaSgH64tkj7atIGWyGf1Wup4Q3VZK\\ndvILjfkZ+kK3IYHZIQ0L4Q8EZGe3BDju0dmGr4VT4blCIRz6aUz5XCW0kucq\\nI3UjZCcu1THONLuUYoLxf1IJ1bDupri6fjve7Q5Lhg==\", \"position\":0
 }",
   "device_id":"device_id"
}

which returns a 200 response.

The following example records a play:
[POST]/v2/discover/feedback/play{  
   "device_id":"device_id",
   "bucket_info":"1{ 

 \"encoded\":\"eNpVT9sOgjAM/Zc+EzNQkfEzSwPNaMItW11C0H+3eEF96+npuXSFGQON4tLs\\nuIUaSltZcylvxSU3R8iA0sbKMhPUeQYzhUYX6BWagzlngL2fAks3OHXCIUK9\\ngg84XnvU9aKWhdoID6oAnWIzBXobQkuBEwonUkb1wsLTGLfL+6/1iE+5aNU2\\n6mmgxvUc5VPYmlfhWlFlq+KLrDH/3OmX+0N5edrf1lzv9nyN6dh3rqUGF7g/\\nAEHSXq0=\", \"position\":0}"
}

which returns a 200 response.

Note:

Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad. To launch the scratchpad, go to Ooyala API Scratchpad.

해당 내용이 도움 되었습니까?