Update a bookmark
Request
To update an existing 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 tokenContent-Type: application/json
Mandatory arguments
If you do not supply a value for a parameter that already has a value, it will be set to null.
So the recommended approach is to use a GET
request to get the bookmark, make the required changes, then use this modified set of parameters in the body of the PUT request.
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
– updates 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 3deviceId
– updates/adds 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
– updates the bookmark name (in body)contentType
– updates/adds the content's type (in body), for example, VOD or live. You can use any string as the value.metadata
– updates/adds additional information that you need to attach to the bookmark, as key/value pairs (in body)tags
– updates/adds the optional tags (in body). You can attach as many as you need. Each tag is a string.
Example
A PUT request with this payload updates an existing bookmark for the specified content and account so that it is 600 seconds (ten minutes) from the beginning:
{
"account": "account1234",
"contentId": "Die Hard",
"position": 600
}
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
{
"account": "account1234",
"contentId": "Die Hard",
"position": 600,
"creationDate": "2021-01-21T10:55:02.478Z",
"modifiedDate": "2021-01-21T11:01:27.217Z"
}
See also
For full details of this API, see the User Activity Vault (UAV) API documentation.