Skip to main content
Skip table of contents

Add a bookmark

Request

To add a bookmark on content for an account, send a PUT request to:

https://<host>:<port>/useractivityvault/v1/clientdata/account/{account}/bookmarks/{contentId}

Headers

  • Authorization: Bearer – bearer token

  • Content-Type: application/json

Mandatory arguments

  • account – the account ID (in both the path and the body)
  • contentId – the ID of the content for which the bookmark is being added (in both the path and the body)
  • position – the position of the bookmark, in seconds from the beginning of the content (in body)

Other arguments

  • pretty – specifies that the output should be pretty-printed (that is, in human-readable format) (query parameter)
  • expires – the time (in seconds) after which the bookmark expires (query parameter). This is to save storage space. Default (from configuration): one year.
  • userId – not used in OPF 3
  • deviceId – the ID of the device (in body). Note that only one bookmark can exist for each content ID (per account). If you try to add a new bookmark for content that already has a bookmark (with a new device ID, for example), the existing bookmark is updated. A new bookmark is not created.
  • name – a name for the bookmark (in body)
  • contentType – the content's type (in body), for example, VOD or live. You can use any string as the value (see caveat to this described below)


Note

Content Delivery (used to deliver Rails objects) will infer recordings, VOD or BTV types etc. using the contentType field in bookmarks and favourites using the following precise mapping (no other value will be recognised):

  • Recordings: npvr-event
  • VOD: vod 
  • BTV: live-event 
  • STCU: live-stcu-event 
  • creationDate – bookmark creation date/time, in ISO 8601 format. If you do not specify this, UAV sets it automatically.
  • modifiedDate – bookmark last modified date/time, in ISO 8601 format. If you do not specify this, UAV sets it automatically.
  • metadata – any additional information that you need to attach to the bookmark, as key/value pairs (in body)
  • tags – optional tags (in body). You can attach as many as you need. Each tag is a string.

Example

A PUT request with this payload adds a bookmark 300 seconds (five minutes) from the beginning for the specified content and account:

CODE
{
    "account": "account1234",
    "contentId": "Die Hard",
    "position": 300
}

Response

A successful request returns an HTTP 201 status.

A bad request returns an HTTP 400 status.

An unauthorised request returns an HTTP 401 status.

Example

CODE
{
    "account": "account1234",
    "contentId": "Die Hard",
    "position": 300,
    "creationDate": "2021-01-21T10:55:02.478Z",
    "modifiedDate": "2021-01-21T10:55:02.478Z"
}

See also

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

JavaScript errors detected

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

If this problem persists, please contact our support.