Asset

Asset holds a collection of Media Entries and metadata. For example, a video and its corresponding subtitles are grouped in an Asset. (to find Asset with subtitle in 4 languages, default is the swi_news channel selected)

 

Call cascade structure examples:

 

  1.   listAssets, listAssetsFindInAllFields or listAssetsFindByMetadata
  • Gives Assets IDs

      2.  a) getAssetMediaEntries

  • Use Asset ID from the response given in step 1, to get the detailed list of mediaEntries of the Asset
  • Give MediaEntry IDs

 b) getMediaEntryById

  • You Use MediaEntry ID from the response given in step 2a, to get the same representation of the file as in 2a but limited to the given MediaEntryId
Method
Description
GET
listAssetshttps://api.srgssr.ch/stxt-accessibility/v1/assets
Return the lists all available assets, the resulting JSON is pageable and sortable. All Asset details and metadata available are visible.
GET
listAssetsFindInAllFieldshttps://api.srgssr.ch/stxt-accessibility/v1/assets/search/findInAllFields
Returns the list of all assets having the given text in one of the fields Title, Creator, External Reference, Tags and MetaData (e.g. Category, Channel, contact information, content description.) Tips : Asset are categorized into culture, politic, sci, tech, sport, business and people. To refine your search, give the category you’re interested in, in the “text” query parameter.
GET
listAssetsFindByMetadatahttps://api.srgssr.ch/stxt-accessibility/v1/assets/search/findByMetadata
Return the lists of all assets matching the given metadata. The query is done with an = so the all metadata word must be given. Available metadata could be seen with listAssets. Tips : to find material with subtitles choose swi_new as channel
GET
getAssetByIdhttps://api.srgssr.ch/stxt-accessibility/v1/assets/{id}
Give the same schema as listAssets, listAssetsFindInAllFields or listAssetsFindByMetadata limited to the Asset whom ID is given in parameter.

MediaEntry

A MediaEntry is a representation of a File

Method
Description
GET
getMediaEntryByIdhttps://api.srgssr.ch/stxt-accessibility/v1/mediaEntries/{id}
Give the same schema as getAssetMediaEntries but limited to the MediaEntry whom ID is given in parameter. Details for MediaEntry schema (Available through getMediaEntryById or getAssetMediaEntries) Evident or irrelevant name meaning are not described       { … 'label': 'fast-food_360p 19-9.mp4', //name of the uploaded file … '_links': { … ' download': { // download link for this file 'href': 'https://srgssr-nonprod-dev.apigee.net/stxt-helios-media/v1/stxt-helios-api/downloadservice/download/367103' }, … 'thumbnailUrl': { // thumbnailUrl link for this file (if available) 'href': 'https://srgssr-nonprod-dev.apigee.net/stxt-helios-media/v1/stxt-helios-api/staticfiles/files/367103/00f508a4-d524-43c7-80d5-70154e445757.png' }, 'previewUrl': { //streaming URL for this mediaentry. 'href': 'https://srgssr-nonprod-dev.apigee.net/stxt-helios-media/v1/streaming/smil:367103.smil/playlist.m3u8' }, 'previewUrlComplete': { //streaming URL for this mediaentry, with other related audiotracks 'href': 'https://srgssr-nonprod-dev.apigee.net/stxt-helios-media/v1/streaming/smil:367103-complete.smil/playlist.m3u8' }, … } }   
GET
getAssetMediaEntrieshttps://api.srgssr.ch/stxt-accessibility/v1/assets/{id}/mediaEntries
Returns the detailed list of mediaEntries filtered by Asset Id given in parameter. The subtitle have the following labels “filename_langugage.SRT” For the swi_news channel, following language are available (EN : Enlglish, DE : German, IT : Italian and FR : French)