Skip to main content
Skip table of contents

Favourites

Summary

The Favourites feature enables the user to store favourite items. The type of item is up to the client application developer; the service does not restrict on item type. Common uses are favourite channels and VOD assets. The service currently only supports a single favourite list per user and item type.

Each favourite can be assigned a priority if needed, to enable the user to order the favourite items (for example to create a list of favourite channels, with the most favourite first). 

Data model

The Favourite data model is provided in the table below, followed by an example of a response.

Favourite data model

This is a JSON object with the following fields:

Name
Type
Description
changeLogString

The change history.

This field is deprecated, and no longer visible to HUE List.

creationDateDateThe date that the Favourite was created.

exportID

IntegerThe ID to export object to third-party systems.
itemTypeCode

String

The item type code associated with the Favourite. For example, Channel for Channel, or Program for Program.

This field is deprecated

itemTypeStringThe item type associated to the Favourite. For example, C for Channel, or P for Program.
itemUIDLongThe item UID associated to the Favourite.
modifiedDateDateThe date that the Favourite was last modified and persisted.
originIDIntegerThe UID of the origin system (third-party system).
originIdAndKeyRead-only stringA unique reference for the object derived by concatenating the originID and originKey, together, separated by a pipe character (|).
originKeyStringThe key of the model object in the origin system (third-party system).
prioritySeqNoIntegerThe priority sequence number associated to the Favourite.
serviceProviderIDLongThe Service Provider UID.
uIDLongThe unique identifier of the Favourite.
userUIDLongThe user UID associated to the Favourite.

Example

JS
{
    "UID" : 12,
    "userUID" : 120,
    "itemTypeCode" : "CHANNEL",
    "itemUID" : 36,
    "prioritySeqNo" : 7,
    "serviceProviderID" : 12
}

7 reads

Use cases

The Favourites Service is accessed directly on the User Activity Vault.

Favourites are stored in a favourites list. You can work with favourite lists or with specific favourite items on a favourite list.

Working with favourite items

Creating a Favourite item for an account

In the example below, the content "TDLA0100000088341751" is being added as a favourite on the account "AC1234":

CODE
PUT http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslist/FL9876/content/TDLA0100000088341751
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
{"contentType": "ASSET", "creationDate": "2017-05-25T05:02:26.833Z"}

Creating a Favourite item for an account and user

In the example below, the content "TDLA0100000088341751" is being added as a favourite on the account "AC1234" for user "USR1234":

CODE
PUT http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslist/FL4567/content/TDLA0100000088341751
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
{"contentType": "ASSET", "creationDate": "2017-05-25T05:02:26.833Z"}

Deleting a Favourite item from an account's favourites list

In the example below, the content "TDLA0100000088341751" is being removed as a favourite from the account "AC1234":

CODE
DELETE http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslist/FL9876/content/TDLA0100000088341751
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD

Deleting a Favourite item from a user's favourites list

In the example below, the content "TDLA0100000088341751" is being removed as a favourite from the account "AC1234" for user "USR1234":

CODE
​DELETE http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslist/FL4567/content/TDLA0100000088341751
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD

Getting Favourites for a given account

In the example below, a list of the favourites on the account "AC1234" is being requested:

CODE
GET http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslist/FL9876
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD

Getting Favourites for a given user

In the example below, a list of the favourites on the account "AC1234" for user "USR1234" is being requested:

CODE
​GET http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslist/FL4567
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD

Working with favourites lists

Creating a new Favourites list for an account

In the example below, a new favourites list "FL6543" is being created on the account "AC1234":

CODE
POST http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslists
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
{"id": "FL6543", "creationDate": "2017-05-25T05:02:26.833Z"}

Creating a new Favourites list for a user

In the example below, a new favourites list "FL5678" is being created on the account "AC1234" for user "USR1234":

CODE
POST http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslists
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
{"id": "FL5678", "creationDate": "2017-05-25T05:02:26.833Z"}

Deleting a Favourite list from an account

In the example below, the favourites list "FL6543" and all its entries are being deleted from the account "AC1234":

CODE
DELETE http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslists/FL6543
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD

Deleting a Favourite list from a user

In the example below, the favourites list "FL5678" and all its entries are being deleted from the account "AC1234" for user "USR1234":

CODE
DELETE http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslists/FL4567
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD

Getting the favourites lists for a given account

In the example below, all favourites lists on the account "AC1234" are being requested:

CODE
GET http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslists
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD

Getting the favourites lists for a given user

In the example below, all favourites lists on the account "AC1234" for user "USR1234" are being requested:

CODE
GET http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslists
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD

Updating a favourites list for an account

In the example below, the favourites list "FL6543" on the account "AC1234" is being updated:

CODE
PUT http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslist
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
{"id": "FL6543", "name": "Kids", "creationDate": "2017-05-25T05:02:26.833Z", "modifiedDate": "2017-05-25T05:02:26.833Z"}

Updating a favourites list for a user

In the example below, the favourites list "FL5678" on the account "AC1234" is being updated:

CODE
PUT http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslist
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
{"id": "FL5678", "name": "Movies", "creationDate": "2017-05-25T05:02:26.833Z", "modifiedDate": "2017-05-25T05:02:26.833Z"}

See also

For more details, see Api Doc - Favourite Item and Api Doc - Favourite Lists in the UAV Installation and User Guide

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.