EPG API is used to get the TV program information (EPG data) for linear channels.
/api/channels
Parameters:
| Requirement | Name | Description | Values |
|---|---|---|---|
| Mandatory | organizationId | id | |
| Optional | lcId | Linear Channel Id | id |
| Optional | keyword | ||
| Optional | from | Event start time from | timestamp |
| Optional | to | Event start time to | timestamp |
| Optional | start | start index | |
| Optional | limit | ||
| Optional | orderby | ||
| Optional | order | asc, desc | |
| Optional/Testing | return | all | |
| Optional | protection | The protection type | smartjoglmtv |
| Optional | url | The encoded URL for protection |
*If lcId (Linear Channel ID) is present, the EPG data for that channel will be returned. Otherwise all channels data for organizationId will be returned.
{ "channels": [ { "logicalChannel": 1, "networkId": 2, "onId": 2, "primaryLanguage": "eng", "title": "FOX", "serviceId": 23083, "tsId": 2, "description": "FOX description", "devices": [ { "id": 63001, "name": "1280x720 (4564 Kbps)", }, { "id": 63002, "name": "1280x720 (6564 Kbps)", "url": "rtsp://46.137.171.102:1935/live/DemoStream" }, { "id": 71112, "name": "640x360 (1264 Kbps)", } ], "bsId": 10 } ]} |
{ "events": [ { "videoUrls": [], "trailerUrls": [], "serviceId": 23083, "eventId": 185666, "description": { "fin": { "shortDescription": "Intialainen keittiö. Jakson teemana on intialainen keittiö, ja sen mausteinen eksotiikka. Santeri kokkaa lehtikaalisipsejä, kookos-katkarapucurrya ja kurkumalassia. Vapaa-ajan ohjelma. 24Kitchen.", "name": "24kitchen: Kapinakokki Santeri Hämäläinen", "longDescription": "Intialainen keittiö. Jakson teemana on intialainen keittiö, ja sen mausteinen eksotiikka. Santeri kokkaa lehtikaalisipsejä, kookos-katkarapucurrya ja kurkumalassia. Vapaa-ajan ohjelma. 24Kitchen." }, "eng": { "shortDescription": "Intialainen keittiö. Jakson teemana on intialainen keittiö, ja sen mausteinen eksotiikka. Santeri kokkaa lehtikaalisipsejä, kookos-katkarapucurrya ja kurkumalassia. Vapaa-ajan ohjelma. 24Kitchen.", "name": "24kitchen: Kapinakokki Santeri Hämäläinen", "longDescription": "Intialainen keittiö. Jakson teemana on intialainen keittiö, ja sen mausteinen eksotiikka. Santeri kokkaa lehtikaalisipsejä, kookos-katkarapucurrya ja kurkumalassia. Vapaa-ajan ohjelma. 24Kitchen." } }, "primaryLanguage": "eng", "ratings": [ { "rating": 0, "country": 902 } ], "info": { "startTime": "2014-07-08T08:45:00Z", "imageLarge": "", "duration": 1800, "imageMedium": "", "freeCaMode": 0, "contentType": 48, "imageSmall": "" } } ]} |
| Requirement | Name | Description | Values |
|---|---|---|---|
| Mandatory | organization_id | id | |
| Optional | lc_id | Linear Channel Id | id |
| Optional | keyword | ||
| Optional | from | Event start time from | timestamp |
| Optional | to | Event start time to | timestamp |
| Optional | start | start index | |
| Optional | limit | ||
| Optional | orderby | ||
| Optional | order | asc, desc | |
| Optional/Testing | return | all | |
| Optional | protection | The protection type | smartjoglmtv |
| Optional | url | The encoded URL for protection |
<linear-channel-list> <channel service-id="1"> <title>CNN</title> <description>Test video</description> <device-list> <device id="1"> <name>iphone</name> <video-url>rtsp://stream.itvsuite2.icareus.com/vods3/_definst_/mp4:amazons3/dikital-root/10132/12661/2601.mp4/1.0.mp4</video-url> </device> <device id="2"> <name>android_phone</name> <video-url>rtsp://stream.itvsuite2.icareus.com/vods3/_definst_/mp4:amazons3/dikital-root/10132/12661/2601.mp4/1.0.mp4</video-url> </device> </device-list> </channel> <channel service-id="2"> <title>NBC</title> <description> To josh with someone or be joshed by someone. It?s an odd phrase that comes from the name ?Joshua? and is used in everyday language meaning to joke or fool. </description> <device-list> <device id="1"> <name>iphone</name> <video-url>rtsp://stream.itvsuite2.icareus.com/vods3/_definst_/mp4:amazons3/dikital-root/10132/12661/2601.mp4/1.0.mp4</video-url> </device> <device id="2"> <name>android_phone</name> <video-url>rtsp://stream.itvsuite2.icareus.com/vods3/_definst_/mp4:amazons3/dikital-root/10132/12661/2601.mp4/1.0.mp4</video-url> </device> </device-list> </channel></linear-channel-list> |
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE eit SYSTEM "eit.dtd"><eit total-events="2"> <event> <id event-id="773" service-id="1"/> <info> <start-time>2010-09-30T13:00:00Z</start-time> <duration>1800</duration> <content-type>32</content-type> <free-ca-mode>0</free-ca-mode> </info> <description> <language-code>dan</language-code> <name>1 DR Update - nyheder og vejr</name> <short-description>DR Update med seneste nyt og dagens vejr.</short-description> </description> </event> <event> <id event-id="1014" service-id="1"/> <info> <start-time>2010-09-30T14:30:00Z</start-time> <duration>1800</duration> <content-type>20</content-type> <free-ca-mode>0</free-ca-mode> </info> <description> <language-code>eng</language-code> <name>1 News</name> <short-description>Daily news</short-description> <long-description></long-description> </description> </event></eit> |
{"linear-channel-list": [ {"icon-large-url":"", "logical-channel":0, "on-id":0, "device-list":[], "title":"MTV", "description":"", "bs-id":0, "service-id":17402, "network-id":0, "icon-medium-url":"", "ts-id":0}, {"icon-large-url":"", "logical-channel":0, "on-id":0, "device-list": "title":"CNN", "description":"", "bs-id":0, "service-id":18002, "network-id":0, "icon-medium-url":"", "ts-id":0} ]} |
{"events": [{"video-url-list": "id": {"service-id":17402, "event-id":17529}, "trailer-url-list": "description": [{"long-description":"Dutch TMZ","name":"Dutch TMZ","short-description":"Dutch TMZ","code":"nld"}, {"long-description":"TMZ","name":"TMZ","short-description":"TMZ","code":"eng"}], "ratings": [{"rating":0,"country":902}], "info": {"icon-large-url":"http://labs2.fyitelevision.com/FYIMediaServices/v_3_3_6_1/Program.svc/87/1714540/Primary/large", "content-type":0, "duration":1800, "free-ca-mode":0, "icon-medium-url":"http://labs2.fyitelevision.com/FYIMediaServices/v_3_3_6_1/Program.svc/87/1714540/Primary", "start-time":"2013-09-03T08:00:00Z", "icon-small-url":"http://labs2.fyitelevision.com/FYIMediaServices/v_3_3_6_1/Program.svc/87/1714540/Primary/thumb"} }],"total-events":1} |
It is possible to define that stream is token protected for a channel.
If the stream is token protected, then every time the stream should be played a new URL should be requested from the server. The parameter "protection" defines the type of the protection. The parameter "url" defines the encoded URL that should be used in token generation. The response will contain the token protected URL to play.
Example request: http://suite.icareus.com/json-connector-portlet/lc-json-connector?protection=smartjoglmtv&url=http%3A%2F%2Fchkg.tdf-cdn.com%2F8336%2Findex.m3u8
Example responce: http://chkg.tdf-cdn.com/8336/de38ae92fcf4de9d6d4b144cd88f01f8/52b84d0b/index.m3u8