The RSP API

Introduction

 This document presents the interface used by Active Video Networks Cloud TV application developers to get access to the assets and their corresponding metadata.RSP exposes this interface through a web service with responses formatted as JSON objects. They follow the fundamental data structure of RSP (feed/post/asset and groups). This interface exposes only posts (and assets) with a “Ready” state, meaning that the media are available in all MSO’s edges.The access to the API is restricted to he perimeter of a content provider identified by an API key associated. Http call header must contain this key to be authorized.

API Methods

Groups: Get All Groups

Returns a list of all groups uses by RSP authorized by the API key included in the header of the request (defines the content provider)

Syntaxhttp://<RSP server>/api/groups/list.json

[ { attributes:{ name:"Top Stories", id:"32", description:"CNN", organization_id:"24", position:"4", parent_id:null }, children:[ ] }, { attributes:{ name:"Business", id:"33", description:"CNN", organization_id:"24", position:"5", parent_id:null }, children:[ ] }, { attributes:{ name:"Showbiz", id:"34", description:"CNN", organization_id:"24", position:"6", parent_id:null }, children:[ ] }, { attributes:{ name:"Sports", id:"35", description:"CNN", organization_id:"24", position:"7", parent_id:null }, children:[ ] }, { attributes:{ name:"Health", id:"36", description:"CNN", organization_id:"24", position:"8", parent_id:null }, children:[ ] }, { attributes:{ name:"World", id:"37", description:"CNN", organization_id:"24", position:"9", parent_id:null }, children:[ ] } ]

 

Example: /api/groups/list.json

Note: RSP does not currently manage a hierarchy of groups. Therefore, the parent/children are always empty.

Groups: Get Group By ID

Returns a list of feeds description that belong to the group.

Syntax: http://<RSP server>/api/groups/show/<Group ID>.json

Example: /api/groups/show/32.json

[ { attributes:{ name:"Top Stories", id:"32", description:"CNN", organization_id:"24", position:"4", parent_id:null }, children:[ ] }, { attributes:{ name:"Business", id:"33", description:"CNN", organization_id:"24", position:"5", parent_id:null }, children:[ ] }, { attributes:{ name:"Showbiz", id:"34", description:"CNN", organization_id:"24", position:"6", parent_id:null }, children:[ ] }, { attributes:{ name:"Sports", id:"35", description:"CNN", organization_id:"24", position:"7", parent_id:null }, children:[ ] }, { attributes:{ name:"Health", id:"36", description:"CNN", organization_id:"24", position:"8", parent_id:null }, children:[ ] }, { attributes:{ name:"World", id:"37", description:"CNN", organization_id:"24", position:"9", parent_id:null }, children:[ ] } ]{/codesitation}
 <h3 id="feeds_overview" name="feeds_overview">Feeds: Overview</h3>
The URL syntax of the /api/feeds/* call is slightly different than a standard groups() call, because it mixes parameters into the URL (feed id) and the query string (sorting, pagination, and categorization methods).
The general syntax of each of these methods provides for all or none of the optional parameters from Figure-1 to be used, but the feed_id for which posts are requested is required.
 
Figure 1 - URL query string parameters for /api/feeds/*
<img src="/images/documentation/rsp-feed-parameters.jpg" width="690" height="736" alt="rsp-feed-parameters" />
 <h3 id="feeds_get_feed_by_id" name="feeds_get_feed_by_id">Feeds: Get Feed By Id</h3>
Returns all posts and assets (including the transcoding ones) with a status equals to “ready”
<strong>Syntax</strong>: http://<RSP server>/api/feeds/show_correct/<Feei Id>.json? <parameters>
<strong>Example</strong>
/api/feeds/show_correct/23.json ( In red, information linked to the feed,,  in blue, information linked to posts and assets, in black, information linked to the call/filters) : 
{codecitation}{ totalposts:2, attributes:{ delay_delete_seconds:"86400", status:"Http Status : 200", suspicious:"0", ttl:"1800", updated_at:"2011-08-04 03:00:09", scraper:null, site_url:"http://itv.news12.com", image_feed:"1", title:"News 12 Stories - CT", update_freq:"720", ignore_suspicious:"0", is_private:null, feed_url:"http://itv.news12.com/feed/storiesAll.xml?regionId=3", C2:"0", checked_at:"2011-08-03 19:00:48", enabled:"1", id:"23", ADI:"0", manual:"0", description:"News 12 Stories - CT", organization_id:"28", copyright:null, passthru:"{region: \"CT\"}", no_deinterlace:"0", position:"20", image:"", image_id:null, explicit:"0", only_current:"0", created_at:"2011-07-11 15:11:41" }, filter:null, categories:null, offset:0, posts:[ { misc_file_type:"", misc_file_location:"", attributes:{ status:"Ready", availability_end:"2099-12-31 23:59:59", availability_start:"1970-01-01 00:00:00", published_parsed:null, title:"Team of the Week: Darien girls lacrosse", guid:"1308869598075", id:"4141", update_uuid:null, feed_id:"23", content:"Team/Week", copyright:null, passthru:"{deeplink: \"false\", cat_code: \"\", masterCategory: \"features\", rank: \"85\"}", link:null, explicit:"0", updated_parsed:"1001-08-01 00:00:00", created_at:"2011-07-11 15:21:06" }, categories:"tea", image:"http://edge-http.ictvsys.pvt/assets/zena_pub_110/assets/155312491/4925", asset_urls:{ r448x336:"http://edge-http.ictvsys.pvt/assets/zena_pub_110/assets/155312491/4924.448_336_ntsc_ac3_2000_nopad.mpg", r448x336:"http://edge-http.ictvsys.pvt/assets/zena_pub_110/assets/155312491/4924.448_336_ntsc_ac3_2000000_nopad.mpg" } }, { misc_file_type:"", misc_file_location:"", attributes:{ status:"Ready", availability_end:"2099-12-31 23:59:59", availability_start:"1970-01-01 00:00:00", published_parsed:null, title:"Team of the Week: Springdale Little League All Star Team", guid:"1309475377075", id:"4142", update_uuid:null, feed_id:"23", content:"Team/Week", copyright:null, passthru:"{deeplink: \"false\", cat_code: \"\", masterCategory: \"features\", rank: \"84\"}", link:null, explicit:"0", updated_parsed:"1001-08-01 00:00:00", created_at:"2011-07-11 15:21:06" }, categories:"tea", image:"http://edge-http.ictvsys.pvt/assets/zena_pub_110/assets/1440698914/4927", asset_urls:{ r448x336:"http://edge-http.ictvsys.pvt/assets/zena_pub_110/assets/1440698914/4926.448_336_ntsc_ac3_2000_nopad.mpg", r448x336:"http://edge-http.ictvsys.pvt/assets/zena_pub_110/assets/1440698914/4926.448_336_ntsc_ac3_2000000_nopad.mpg" } } ] }
  

Feeds: List all Categories In Feed

Syntax: http://<RSP server>/api/feeds/list_cat/<Feed Id>.json?<parameters>

Returns  a list of all categories found in the ready posts of the feed. Within a specific post with multiple  categories, those categories are separated by “||”. This call allows the developer to define which categories are available to search for assets (cf. previous call).

Example: /api/feeds/list_cat/23.json?cat=app_iphone

[ "app_IPhone || AVN_HS_Programming/Highlights || AVN_HS_Programming/Interviews and Features || AVN_Varsity_Shows/High School SportsDesk || region_Long Island || region_New Jersey || sport_Ice Hockey", "app_IPhone || AVN_HS_Programming/Highlights || AVN_HS_Programming/Interviews and Features || AVN_Varsity_Shows/High School SportsDesk || guid_1810234662 || region_Long Island || region_Long Island/hs_Great Neck South || region_Long Island/hs_Ward Melville", "app_IPhone || AVN_HS_Programming/Highlights || AVN_HS_Programming/Interviews and Features || AVN_Varsity_Shows/High School SportsDesk || region_New Jersey || hs_Pascack Valley || sport_Basketball - Girls", "app_IPhone || AVN_HS_Programming/Highlights || AVN_HS_Programming/Interviews and Features || AVN_Varsity_Shows/High School SportsDesk || region_Hudson Valley || hs_Highland || sport_Basketball - Boys", "app_IPhone || AVN_HS_Programming/Highlights || AVN_HS_Programming/Interviews and Features || AVN_Varsity_Shows/High School SportsDesk || region_Long Island || hs_Rocky Point || sport_Cheerleading" ]

 

Posts: Get Post By "GUID"

Retrieves a ready post with the specified GUID. The GUID is preserved from the original source, so if cross referencing RSP ingested posts against another API, use the GUID to reference a post where you already have the GUID from the content provider.

Syntax://<RSP server>/api/posts/getByGUID /<GUID>.json

 

Examples: /api/posts/getByGUID/1308869598075.json

{ misc_file_type:"", misc_file_location:"", attributes:{ status:"Ready", availability_end:"2099-12-31 23:59:59", availability_start:"1970-01-01 00:00:00", published_parsed:null, title:"Team of the Week: Darien girls lacrosse", guid:"1308869598075", id:"4141", update_uuid:null, feed_id:"23", content:"Team/Week", copyright:null, passthru:"{deeplink: \"false\", cat_code: \"\", masterCategory: \"features\", rank: \"85\"}", link:null, explicit:"0", updated_parsed:"1001-08-01 00:00:00", created_at:"2011-07-11 15:21:06" }, categories:"tea", image:"http://edge-http.ictvsys.pvt/assets/zena_pub_110/assets/155312491/4925", asset_urls:{ r448x336:"http://edge-http.ictvsys.pvt/assets/zena_pub_110/assets/155312491/4924.448_336_ntsc_ac3_2000_nopad.mpg", r448x336:"http://edge-http.ictvsys.pvt/assets/zena_pub_110/assets/155312491/4924.448_336_ntsc_ac3_2000000_nopad.mpg" } }

 

  • Friday, 12 August 2011
  • Tags: APIs
  • Number of Views: 3669

Your destination to find out more about just how easy it is to develop advanced applications that leverage the “write-once, deploy-everywhere” content creation environment of ActiveVideo’s CloudTV™ platform. You will be able to significantly reduce app time-to-market for connected devices of all types, as well as cable settop boxes that have no additional connectivity. Manufacturers and virtual service providers, as well as cable and IPTV operators around the world are currently benefiting from the advantages of ActiveVideo’s CloudTV platform.

© 2019 Active Video Networks. All Rights Reserved