OpenTV ENTera & OpenTV Platform Documentation

Get all favourites in a favourites list

Request

To retrieve all the favourites in a particular favourites list for an account, send a GET request to:

http://<host>:<port>/useractivityvault/v1/clientdata/account/{account}/favouriteslists/{id}

An account can have multiple favourite lists. To get all the favourites lists for an account, see Get favourites lists for an account.

Headers

  • Authorization: Bearer – bearer token

  • Content-Type: application/json

Mandatory arguments

  • account – the ID of the account (in path)

  • id – the ID of the favourite list (in path)

Other arguments

  • pretty – specifies that the output should be pretty-printed (that is, in human-readable format) (query parameter)

  • fields – specifies which fields to return (query parameter). By default, all fields are returned.

  • limit – the number of favourites to return (query parameter)

  • offset – the number of favourites to skip (for pagination) (query parameter)
    For example:?limit=10 returns the first 10 favourites.?limit=10&offset=10 returns the second 10 favourites.

  • sort – the parameter on which to sort the favourites. Allowed values:modifiedDateAsc modifiedDateDesc 

Response

A successful request returns an HTTP 200 status.

A bad request returns an HTTP 400 status.

An unauthorised request returns an HTTP 401 status.

Example

A successful request returns a payload that looks like this:

{
    "favourites": [
        {
            "favouriteListId": "48ebcf50-936e-11e9-b982-1b10c665e116",
            "contentId": "murder",
            "contentType": "asset",
            "name": "Murder",
            "categories": [
                "horror"
            ],
            "creationDate": "2019-06-21T08:07:24Z",
            "modifiedDate": "2019-06-21T08:07:24Z",
            "metadata": {
                "domain": "btv"
            }
        },
        {
            "favouriteListId": "48ebcf50-936e-11e9-b982-1b10c665e116",
            "contentId": "scream",
            "contentType": "asset",
            "name": "Scream",
            "categories": [
                "horror"
            ],
            "creationDate": "2019-06-21T07:52:15Z",
            "modifiedDate": "2019-06-21T07:52:15Z",
            "metadata": {
                "domain": "btv"
            }
        },
        {
            "favouriteListId": "48ebcf50-936e-11e9-b982-1b10c665e116",
            "contentId": "terror",
            "contentType": "asset",
            "name": "Terror",
            "categories": [
                "horror"
            ],
            "creationDate": "2019-06-21T07:53:04Z",
            "modifiedDate": "2019-06-21T07:53:04Z",
            "metadata": {
                "domain": "btv"
            }
        }
    ],
    "totalRecords": 3
}

See also

For full details of this API, see User Activity Vault (UAV) API documentation.