Request
To rate a content for a user profile, send a POST request to:
https://<host>:<port>/useractivityvault/v1/useractivity/rating
You do not need to specify the user profile – UAV reads it from the token.
Headers
-
Content-Type: application/json
Mandatory arguments
-
accountId– the ID of the account -
deviceId– the ID of the device -
contentId– the ID of the content being rated -
rating– the rating, as a whole number from 1 to 10. Recommendations use only ratings from 1 to 10; a rating with any other value is stored but is not used for recommendations. -
name– must be"rating" -
metadata– an object containing key/value pairs, for example"contentType": "vod-ed".This must contain the details listed in the Required metadata section below. These are required for recommendation functionality.
Example
A POST request with this payload submits a rating of 3 for the content with the ID GLOBAL_20711 for the specified account:
{
"accountId": "Account1234",
"deviceId": "619e24ef63865312a726323e",
"contentId": "GLOBAL_20711",
"rating": 3,
"name": "rating",
"metadata": {
"contentType": "vod-ed",
"technicalId": "vod-tech-1",
"editorialId": "GLOBAL_20711",
"seriesId": "298940",
"deviceType": "Android"
}
}
Effect on recommendations. A rating replaces the score that the user’s earlier activities have built up for that content; later activities then adjust it again. For how ratings are converted, see Recommendations in Reporting activity and event metrics to UAV.
Response
A successful request returns an HTTP 202 status.
A bad request returns an HTTP 400 status.
An unauthorised request returns an HTTP 401 status.
See also
For full details of this API, see User Activity Vault (UAV) API documentation.