Retrieve catalogue node information
The catalogue node information can be retrieved by using the MDS nodes API.
Retrieving the root nodes
Root nodes are nodes considered to be at the top of the catalogue tree (the tree is upside down). These nodes have no parent nodes and are typically the first nodes the user sees when using a video on demand UI. Each node has an isRoot
boolean flag, and on root nodes, this value is true. Therefore to retrieve the root nodes, use a query such as:
http://server:port/metadata/delivery/[provider]/vod/nodes?filter={"isRoot":true, "locale":"en_GB"}&sort=[["nodeOrder",1]]&fields=["id", "Title", "Rating", "Children"]&offset=0&limit=10
The nodeOrder
gives the operator/content provider-specified node order, so in the above example, the nodes are requested in that order instead of ordering it in the UI. The Children
field gives a list of child node identifiers. Typically, most deployments do not mix nodes and content at the same level, so the existence of child nodes can usually be used to determine if the node has child nodes or content. Be aware that if a node has many child nodes, evaluating the response will take much longer. However, this might be more efficient than doing two calls, one to find any nodes and one to find any assets.
Retrieving child nodes
Once a user has selected a root node or other node to navigate into, that node's child nodes should be retrieved to continue navigation. The child nodes of a parent node can be retrieved by specifying the parent node ID as a filter. For example, given a parent node with ID, 8d2ea53e-b05d-44db-bfb0-624c71415fdb
:
http://server:port/metadata/delivery/[provider]/vod/nodes?filter={"parent":"8d2ea53e-b05d-44db-bfb0-624c71415fdb", "locale":"en_GB"}&sort=[["nodeOrder",1]]&fields=["id", "Title", "Rating", "Children"]&offset=0&limit=10