Get all bookmarks
Request
To get all bookmarks for a profile, send a GET request to:
https://<host>:<port>/useractivityvault/v1/clientdata/account/{account}/user/{userId}/bookmarks
Note that a bookmark’s position (as returned by this endpoint) is expressed in seconds, while content duration (returned from MDS or Content Discovery Facade) is expressed in minutes.
This API supports:
Filtering by tag
Limiting the number of records returned and specifying paging
Sorting results chronologically by modification date (ascending or descending)
Sorting results by content ID
You can categorise the bookmarks that are returned into “Continue Watching” and “Recently Watched” lists by comparing the returned position value with the content duration to calculate the percentage watched:
If the percentage watched is less than a certain value (e.g., 90%), put the content in the “Continue Watching” list.
If the percentage watched is greater than this value, put the content in the “Recently Watched” list.
Rails Builder (in OpCon) lets you add “Continue Watching” and “Recently Watched” rails which are delivered to the client in a Content Delivery request, which saves having to implement this functionality on the client.
See:
Headers
Authorization: Bearer– bearer tokenContent-Type: application/json
Mandatory arguments
account– the account ID (in the path)userId– the profile ID (in the path)sort– the parameter on which to sort the bookmarks (query parameter). Allowed values:contentId(default)modifiedDateAscmodifiedDateDesc
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 records to return (query parameter)offset– the number of records to skip (for pagination) (query parameter)
For example:?limit=10returns the first 10 bookmarks.?limit=10&offset=10returns the second 10 bookmarks.
filter– specifies the tag to filter by (query parameter). You can only specify one tag here.
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
{
"bookmarks": [
{
"account": "1",
"userId": "Oliver",
"deviceId": "333",
"contentId": "trainspotting",
"name": "n",
"contentType": "asset",
"position": 30,
"creationDate": "2021-01-22T08:52:51Z",
"modifiedDate": "2021-01-22T08:52:51Z",
"metadata": {},
"tags": [
"In Progress"
]
},
{
"account": "1",
"userId": "Oliver",
"contentId": "trainspottingg",
"contentType": "asset",
"position": 30,
"creationDate": "2021-01-22T08:47:41Z",
"modifiedDate": "2021-01-22T08:47:41Z",
"metadata": {},
"tags": [
"In Progress"
]
}
],
"totalRecords": 2
}
See also
For full details of this API, see the User Activity Vault (UAV) API documentation.