Get All Items from a Watchlist

This endpoint retrieves all the items belonging to the specified watchlist.

HTTP Request

GET https://player.ooyala.com/watchlist/v3/<watchlist_id>/items?page_number=<123>&page_size=<10>&account_token=<account_token>

Query Parameters

Parameter Description Type Required
api_version Must be v3. String Yes (URL)
watchlist_id The ID of the watchlist containing the items to retrieve. Must be a valid UUID linked to an existing watchlist associated with the user's account. If not specified, items are retrieved from the user's default watchlist. UUIDv4 OR String No (URL)
page_number Specifies which page (of items) to return. Must be an integer value greater than or equal to 0.
Note: Pages are numbered starting at index 0.
String Yes (URL)
page_size Specifies the number of items per page. If specified, must be an integer value greater than or equal to 1. If not specified, the default page size is 10 items. String No (URL)
account_token Used by the Watchlist Service to reference the watchlist associated with a particular end user (identified by their UUID). For details, see Ooyala Account Token API. String Yes (URL body)

Returned Metadata

If you are using an Ooyala-supported metadata store, the following metadata is returned.
Note: The Watchlist Service is not responsible for automatically maintaining synchronization with the asset metadata store. If an asset is deleted/modified in the metadata store, this will not automatically cause all references to this asset (within the watchlist's scope) to be deleted/modified.
Field Description
position The placement of the item in the list.
created_at The time that the list was created.
updated_at The last time the list was updated.
items A list of each asset_id included on the list.
metadata All the metadata about the asset.
Note: Depending on the supported asset metadata store you are using, additional metadata might be returned.

Return Codes

Code Reason Description
200 OK GET request succeeded.
400 Request error Failed due to any of the following issues:
  • Parameters are missing or formatted incorrectly.
  • The specified watchlist_id is not empty and does not exist.
401 Unauthorized The specified account_token is invalid.
404 Not found The server is down.
500 Internal server error An internal server error occurred.

Example

Request
[GET]/watchlist/v3/d074b535-253d-4f6a-82a1-1be384e7c182/items?account_token=NnMvb01DWWRMWmJXdTRRRUJCQmwvWjE4WVQvUytpSittY2h0azlmWWZPVVlUc25MOGxPNzZJV2ttMzk0TG4ydlkvbFZrZTI4VkNIYUJiU0owTGFadlFxenM3YU5mS2VrYXRjSVhpWDBXUS84S2VDQ0dUNmJYTmhEY2VNSkZ1dmc=&page_number=0&page_size=10
Response (Success)
  • Position indexing begins at 0.
  • Page number indexing begins at 0.
  • Items are ordered in response according to their position index (Ascending).
  • Metadata may or may not exist for a particular item (video). If it does not, then the metadata field is not returned in the corresponding json object for that item. Item metadata will be a json-formatted collection of key-value pairs corresponding to the metadata associated with the specified item.
OK(200)
{
    "account_pcode": "t5SYJyOnyQw1eBBfirDLeVPt_p18",
    "account_id": "18285cswfcdf204896230fc2a67a5faf",
    "watchlist_id": "d074b535-253d-4f6a-82a1-1be384e7c182",
    "created_at": 1454351584074,
    "name": "horror movies",
    "updated_at": 1454351595185,
    "number_of_items": 2
   "page_size": 10,
   "page_number": 0,
   "items": [
    {
      "watchlist_id": "d074b535-253d-4f6a-82a1-1be384e7c182",
      "created_at": 1454351584084,
      "item_id": "VlNWJrdarkDhWd-y4D0NuEbHi872V9_y",
      "updated_at": 1454351584094,
      "position": 0,
	      "metadata": {
                       “rating” : “PG13”,
                       …
                       “year” : “2014”,
                      }
    },

   …,

    {
      "watchlist_id": "d074b535-253d-4f6a-82a1-1be384e7c182",
      "created_at": 1454351584094,
      "item_id": "VlNWJrdarkDhWd-y4D0NuEbHi872V9_z",
      "updated_at": 1454351584194,
      "position": 1,
	      "metadata": {
                       “rating” : “PG13”,
                       …
                       “year” : “2015”,
                      }
    }
  ]
}

해당 내용이 도움 되었습니까?