Rate content for an account
Request
To rate a content for an account, send a POST request to:
https://<host>:<port>/useractivityvault/v1/useractivity/rating
Headers
Content-Type: application/json
Mandatory arguments
accountId– the ID of the accountdeviceId– the ID of the devicecontentId– the ID of the content being ratedrating– the rating (typically a value between one and five)name– must be"rating"metadata– a block containing one or more key/value pairs in the following form:JSON[{ "key": "<key_name>", "value": "<value>" }]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 an ID avatar1 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"
}
}
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.