DR MU-online API documentation - v. 1.2

Introduction

MU-online API documentation. The API is used for DR TV.

Asset

Returns files from the database by ids. This controller shold not be directly called, but instead redirected to from the bar-controller.

API Description
GET api/1.2/asset/{id}?width={width}&height={height}&crop={crop}&raw={raw}

Returns a given file from the database. If the file is an image it can be scaled. The base normally holds image thumbnails and subtitles. May return 4xx if either the file is not found or invalid parameters are present.

Bar

Binary Asset Resolver. If you need a binary asset, you have to request it at the BAR. See AssetController for support image parameters, which are forwarded.

API Description
GET api/1.2/bar/{id}

Redirects to the desired asset. Targets includes images, subtitles and public manifests. Queries are forwarded to the destination.

GET api/1.2/bar/helper/get-image-for-bundle/{id}/{forcechanneloverrideid}

Gets an image for a bundle. Falls back to the image from the override bundle id if specified in forcechanneloverrideid, otherwise it falls back to PrimaryChannel image, if the bundles does not have an image.

GET api/1.2/bar/helper/get-image-for-programcard/{id}/{forcechanneloverrideid}

Gets an image for a programcard. Falls back to series image, then the image from the override bundle id if specified, otherwise to the PrimaryChannel image, if the bundles does not have an image.

Channel

End point to read channel bundle. Used for live players.

API Description
GET api/1.2/channel/{id}

Return info for a given channel

GET api/1.2/channel/all-active-dr-radio-channels

Return all active radio channels

GET api/1.2/channel/all-active-dr-tv-channels

Gets all active tv channels. DR1, DR2, DR3, DR Ramasjang, DR Ultra and DR K

Configuration

End point to read configuration documents.

API Description
GET api/1.2/configuration/{id}

Read a given configuration. TODO: Remove if no use case.

GET api/1.2/configuration/service-message/{id}

Returns a service message for a given id. If it is enabled otherwise null.

List

Provides end points for lists available for the DRTV applications

API Description
GET api/1.2/list/{id}?limit={limit}&offset={offset}&excludeid={excludeid}

Gets a paged list by either slug or urn.

GET api/1.2/list/view/lastchance?limit={limit}&offset={offset}

TODO add description

GET api/1.2/list/view/mostviewed?channel={channel}&channeltype={channeltype}&limit={limit}&offset={offset}

Gets a paged list of most viewed programcards within the latest 7 days filtered by channel and channeltype. Lists are paged by 12 per default.

GET api/1.2/list/view/news?limit={limit}&offset={offset}

List of news for the news zone

GET api/1.2/list/view/quicksearch/{query}?orderby={orderby}&orderdescending={orderdescending}&limitprograms={limitprograms}&limitepisodes={limitepisodes}

GET api/1.2/list/view/selectedlist?limit={limit}&offset={offset}

Gets a list of current selected spots. First item with larger image than the following items.

GET api/1.2/list/view/themesoverview?limit={limit}&offset={offset}

Overview list of themes. Combines first programcard from each theme into one list. Series information on each MuListItem is info from theme and not from the belonging series. Overview collection only includes repremiere themes.

Manifest

API Description
GET api/1.2/manifest/{id}

TODO add description

Page

Provides end points for all page for the DRTV applications

API Description
GET api/1.2/page/tv/children/front/{channel}

Data for childrenfrontpage TODO is this description enough?

GET api/1.2/page/tv/children/live/{channel}

Data for children live

GET api/1.2/page/tv/children/player/{programcardid}?seriesid={seriesid}&channel={channel}

Data for children player. New in 1.1: now include the selected episode in the relations list.

GET api/1.2/page/tv/front

Endpoint for data necessary to build a DRTV Frontpage

GET api/1.2/page/tv/live/{channel}

Endpoint for livepage

GET api/1.2/page/tv/player/{programcardid}?seriesid={seriesid}

Endpoint for data necessary to build a DRTV Playerpage for a specific episode. New in 1.1: now include the selected episode in the relations list.

GET api/1.2/page/tv/prefetch-search

Search prefetch provider

GET api/1.2/page/tv/programs?onlinegenretexts={onlinegenretexts}&index={index}&channel={channel}&orderby={orderby}&orderdescending={orderdescending}&excludegeofiltered={excludegeofiltered}&assettarget={assettarget}

Endpoint for program page. Only one parameter at a time can be used as filter, except for the two order-parameters.

GET api/1.2/page/tv/programs-search/{query}?onlinegenretexts={onlinegenretexts}&channels={channels}&orderby={orderby}&orderdescending={orderdescending}&limit={limit}&offset={offset}&assettarget={assettarget}

Endpoint for program search page. Searches free text in Series Titles. The series must have one or more programcards with a public asset. The result is ordered alphabetically by series title, unless otherwise is specified in paramters.

GET api/1.2/page/tv/programs-search-typeahead/{query}?onlinegenretexts={onlinegenretexts}&channels={channels}&orderby={orderby}&orderdescending={orderdescending}&limitprograms={limitprograms}&limitepisodes={limitepisodes}&assettarget={assettarget}

Searches free text in Series Titles and Programcards Titles. The series must have one or more programcards with a public asset. The result is ordered alphabetically by series title, unless otherwise is specified in paramters.

GET api/1.2/page/tv/themes?themenamesonly={themenamesonly}

List of all current themes.

ProgramCard

End point to read programcards.

API Description
GET api/1.2/programcard/{id}

Gets a ProgramCard by id

Reporting

This end point is used to register and count content (audio/video) consumption. Each client required to report usage to this controller, or another DR approved method.

API Description
POST api/1.2/reporting/gemius

Records player events to Gemius. WIP. When a FirstPlay-action is found it also increases the viewed hitcount for a programcard. If your client uses gemius javascript to track plays, you do not need to call this endpoint. This method also register a first play event to the "most viewed" stats mentioned in the "viewed" method. That means if your client uses THIS (gemius) method you must not also use the "viewed" method.

POST api/1.2/reporting/track

Tracks the specified event for a login user. When tracking a logoff event, please track before doing the actual logoff. If the token for the user cannot be validated by SSO and the user is not recognized, the event will be logged without user info

POST api/1.2/reporting/viewed

Increases the viewed hitcount for a programcard. Use to keep most viewed list up to date. All client must call this method once for each play event on a new programcard. Eg. new id. A PLAY->PAUSE->PLAY event chain for the same programcard, should only call this method one time. NOTE: if you are using endpoint /Gemius you should not call this, hitcount will be increased automatically when a FirstPlay-action is sent

Schedule

End point for EPG/Schedule data.

API Description
GET api/1.2/schedule/{id}?broadcastdate={broadcastdate}

Gets a schedule for a given channel and broadcast date.

GET api/1.2/schedule/nownext/{id}

Gets scheduled Now and Next programs for a given id, i.e. channel dr1

GET api/1.2/schedule/nownext-for-all-active-dr-tv-channels

Gets NowNext for all active tv channels. DR1, DR2, DR3, DR Ramasjang, DR Ultra and DR K

Search end point, uses Solr.

API Description
GET api/1.2/search/tv/programcards-latest-episode-with-asset/series-title/{query}?onlinegenretexts={onlinegenretexts}&channels={channels}&orderby={orderby}&orderdescending={orderdescending}&excludegeofiltered={excludegeofiltered}&limit={limit}&offset={offset}&assettarget={assettarget}

Free text search method. Searches free text in Series Titles. The series must have one or more programcards with a public asset. The result is ordered alphabetically by series title, unless otherwise is specified in paramters.

GET api/1.2/search/tv/programcards-latest-episode-with-asset/series-title-starts-with/{query}?onlinegenretexts={onlinegenretexts}&channels={channels}&orderby={orderby}&orderdescending={orderdescending}&excludegeofiltered={excludegeofiltered}&limit={limit}&offset={offset}&assettarget={assettarget}

Free text search method. Searches Series Titles starting with the supplied query. The series must have one or more programcards with a public asset. The result is ordered alphabetically by series title, unless otherwise is specified in paramters.

GET api/1.2/search/tv/programcards-with-asset/title/{query}?onlinegenretexts={onlinegenretexts}&channels={channels}&orderby={orderby}&orderdescending={orderdescending}&excludegeofiltered={excludegeofiltered}&site={site}&limit={limit}&offset={offset}&assettarget={assettarget}&skiptotalsize={skiptotalsize}

Free text search method. Searches free text in programcard Title.

SystemStatus

Run system health checks for the api.

API Description
GET api/1.2/systemstatus No documentation available
GET api/1.2/systemstatus/{id} No documentation available
GET api/1.2/systemstatus/monitoring No documentation available

User

Controller for user related operations. All user related operations requires https
All user related operation requires a cookie set by the DR SSO service. This is set by the SSO service on all dr.dk pages
Cookie must be in the following format
Cookie: dr-sso-ticket=ticket=123456789...IsPersistent=0; path=/
Ticket is generated by the dr.dk/login SSO service
If an app needs to call this user api outside dr.dk pages, the request must apply the cookie to the request.
Progress events are stored in a seperate api site. Documentation is located here https://dr-tv-userdata.azurewebsites.net

API Description
GET api/1.2/user/add-favorite?id={id}

Add a favorite for a user.

POST api/1.2/user/add-last-viewed

Add an entry to the user's last viewed list.

GET api/1.2/user/clear-favorites

Clears all favorites for a user.

GET api/1.2/user/clear-last-viewed

Clears all lastviewed for a user.

GET api/1.2/user/get-data

obsolete Gets favorite series and last viewed programs for a user including progress data for the last viewed programs

GET api/1.2/user/get-favorites?limit={limit}&offset={offset}

Gets favorite series for a user.

GET api/1.2/user/get-last-viewed?limit={limit}&offset={offset}

Gets last viewed programs for a user including progress data.

GET api/1.2/user/remove-favorite?id={id}

Removes a favorite for a user

GET api/1.2/user/remove-last-viewed?id={id}

Remove a single last viewed entry for a user.