Add an Item to a Watchlist

This endpoint adds an item to the specified watchlist for the specified user.

Item Position in the Watchlist

  • The position indexing (numbering) begins at 0.
  • The items are inserted in stack order. The most recently added item occupies position 0. The least recently added item occupies position n (assuming the user has n+1 items in their watchlist). For example, if you add Item A, then A is position 0. If you add Item B, then B is position 0, and A is position 1.
  • Upon insertion, the positions of all other items get updated automatically.

HTTP Request

POST https://player.ooyala.com/watchlist/v3/<watchlist_id>/items?account_token=<account_token>
{
    "item_id": "<12345>"
}

Query Parameters

Parameter Description Type Required
api_version Must be v3. String Yes (URL)
watchlist_id The ID of the watchlist to add items to. Must be a valid UUID linked to an existing watchlist associated with the user's account. If not specified, items are added to the user's default watchlist. UUIDv4 OR 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)
item_id ID of the item (asset) to add.
Note: If the specified item already exists in the target watchlist, no changes occur but no error is thrown. The system does not check on the validity of the item_id in the watchlist.
String Yes (body)

Return Codes

Code Reason Description
201 OK POST request succeeded. The new item was created successfully.
400 Request error Failed due to any of the following issues:
  • Parameters are missing or formatted incorrectly.
  • The specified item already exists in the watchlist.
  • 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
[POST]/watchlist/v3/d074b535-253d-4f6a-82a1-1be384e7c182/items?account_token=NnMvb01DWWRMWmJXdTRRRUJCQmwvWjE4WVQvUytpSittY2h0azlmWWZPVVlUc25MOGxPNzZJV2ttMzk0TG4ydlkvbFZrZTI4VkNIYUJiU0owTGFadlFxenM3YU5mS2VrYXRjSVhpWDBXUS84S2VDQ0dUNmJYTmhEY2VNSkZ1dmc=
{
    "item_id" : "VlNWJrdarkDhWd-y4D0NuEbHi872V9_x"
}
Response (Success)
OK(200)

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