api:iptv:channel:create
Table of Contents
API : IPTV : Channel : Create
Introduction
This request will create a new channel that will be available to the resellers customer (if reseller and customer has feature IPTVPRIVATE) or to the business customer (if the customer has the feature IPTVBUSINESS).
Creating a channel that references a base channel can only be done by an ADMIN, as it depends on which channels has been purchased by the reseller/customer. Local channels can be created by a reseller (with feature IPTVPRIVATE) or a customer (with feature IPTVBUSINESS).
Request
| URL | https://api.telecomx.dk/iptv/channel | ||
|---|---|---|---|
| Method | POST | ||
| Access level | MANAGER or OWNER if customer has feature IPTVBUSINESS RESELLER if customer has IPTVBUSINESS or IPTVPRIVATE ADMIN |
||
| Body | number | Number | Channel number in the list of channels, ex. for direct selection on STB's. Null to auto-select the first available number. |
| baseChannel | Number | Id of the base channel this channel is based on, null if channel is a local channel (only ADMIN can specify this). | |
| name | String | Name of channel. Null to inherit name from base channel. | |
| locals | Array | List of URLs that the channel can be streamed from locally to STB's, otherwise null. Must be a proper URL with a protocol of http/https/udp/rtp. | |
| dvbOnly | Boolean | True if channel can only be delivered on DVB, not streaming. | |
| epgId | String | Id of EPG source, if channel is not based on a base channel. | |
| customer | Id | Id of the customer to create the channel on (reseller with feature IPTVPRIVATE or customer with feature IPTVBUSINESS). | |
| dvb | Object | DVB settings, if channel is available on DVB, otherwise null. | |
| dvb.freq | Number | Frequency in hz, e.g. 218002. | |
| dvb.id | String | Id - used for selecting the channel, e.g. 'C_1039_218000'. | |
| dvb.mod | Number | Modulation. | |
| dvb.chBW | Number | Channel BW. | |
| dvb.fec | Number | Forward Error Correction. | |
| dvb.symrate | Number | Symbolrate. | |
| dvb.type | Number | Type. | |
| dvb.pcrpid | String | Program Clock Reference PID. | |
| dvb.pmtpid | String | Program Map Tables PID. | |
| dvb.prog | String | Program. | |
| dvb.pids | Array | List of PID's for this channel. | |
| pids[].pid | String | PID id - ex; '185'. | |
| pids[].type | String | Type of pid - ex: 1'. | |
Query example
{
number: 1,
baseChannel: 7,
name 'TV2',
dvbOnly: false,
customer: '12345678901234567890AAAA',
dvb: {
freq: 218002,
id: 'C_1039_218000',
mod: 7,
chBW: 0,
fec: 4095,
symrate: 6875,
pcrpid: 1065,
pmtpid: 185,
prog: 1039,
pids: [
{
"pid": "0",
"type": "0"
},
{
"pid": "185",
"type": "1"
},
{
"pid": "1065",
"type": "2"
},
{
"pid": "1065",
"type": "6"
},
{
"pid": "4035",
"type": "17"
},
{
"pid": "3175",
"type": "10"
},
{
"pid": "6602",
"type": "17"
},
{
"pid": "6116",
"type": "17"
},
{
"pid": "6603",
"type": "17"
},
{
"pid": "630",
"type": "17"
},
{
"pid": "631",
"type": "17"
},
{
"pid": "606",
"type": "17"
}
],
},
locals: [
'http://192.168.10.20:1234/live/tv2.m3u8',
'http://192.168.10.21:1234/live/tv2.m3u8'
]
}
Response
The newly created channel.
| JSON object | ||
|---|---|---|
| _id | Id | Unique id of the TV channel. |
| number | Number | Channel number in the list of channels, ex. for direct selection on STB's. |
| baseChannel | Number | Id of the base channel this channel is based on, null if channel is a local channel. |
| name | String | Name of channel. |
| logo | Id | Id of channel logo, overrides base channel logo. Null to use base channel logo, if available. |
| dvbOnly | Boolean | True if channel can only be delivered on DVB, not streaming. |
| epgId | String | Id of EPG source, if channel is not based on a base channel. |
| locals | Array | List of URLs that the channel can be streamed from locally to STB's, otherwise null. |
| dvb | Object | DVB settings, if channel is available on DVB, otherwise null. |
| dvb.freq | Number | Frequency in hz, e.g. 218002. |
| dvb.id | String | Id - used for selecting the channel, e.g. 'C_1039_218000'. |
| dvb.mod | Number | Modulation. |
| dvb.chBW | Number | Channel BW. |
| dvb.fec | Number | Forward Error Correction. |
| dvb.symrate | Number | Symbolrate. |
| dvb.type | Number | Type. |
| dvb.pcrpid | String | Program Clock Reference PID. |
| dvb.pmtpid | String | Program Map Tables PID. |
| dvb.prog | String | Program. |
| dvb.pids | Array | List of PID's for this channel. |
| pids[].pid | String | PID id - ex; '185'. |
| pids[].type | String | Type of pid - ex: 1'. |
Note that properties holding no value may be omitted from the object.
Example
{ _id: '12345678901234567890ABCD', number: 1, baseChannel: 7, name 'TV2', logo: null, dvbOnly: false, dvb: { freq: 218002, id: 'C_1039_218000', mod: 7, chBW: 0, fec: 4095, symrate: 6875, pcrpid: 1065, pmtpid: 185, prog: 1039, pids: [ { "pid": "0", "type": "0" }, { "pid": "185", "type": "1" }, { "pid": "1065", "type": "2" }, { "pid": "1065", "type": "6" }, { "pid": "4035", "type": "17" }, { "pid": "3175", "type": "10" }, { "pid": "6602", "type": "17" }, { "pid": "6116", "type": "17" }, { "pid": "6603", "type": "17" }, { "pid": "630", "type": "17" }, { "pid": "631", "type": "17" }, { "pid": "606", "type": "17" } ], }, locals: [ 'http://192.168.10.20:1234/live/tv2.m3u8', 'http://192.168.10.21:1234/live/tv2.m3u8' ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 409 | number | The channel number is not available |
| 422 | number | The channel number is out of range - only 1-999 is allowed |
| 403 | baseChannel | Insufficient access to select a base channel |
| 404 | baseChannel | Base channel not found |
| 422 | locals[] | Invalid URL |
| 422 | dvb.freq | Invalid frequency |
| 422 | dvb.id | Invalid id, format as T/C_program_frequency |
| 422 | dvb.mod | Invalid modulation |
| 422 | dvb.chBW | Invalid channel BW |
| 422 | dvb.fec | Invalid forward error correction |
| 422 | dvb.symrate | Invalid symbolrate |
| 422 | dvb.type | Invalid type |
| 422 | dvb.pcrpid | Invalid Program Clock Reference PID |
| 404 | dvb.pcrpid | Program Clock Reference PID not found in pids |
| 422 | dvb.pmtpid | Invalid Program map tables PID |
| 404 | dvb.pmtpid | Program map table PID not found in pids |
| 422 | dvb.prog | Invalid program |
| 422 | dvb.pids | One or more pids are invalid |
| 404 | customer | Customer not found |
| 409 | customer | Customer cannot host common IPTV settings |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/iptv/channel/create.txt · Last modified: 2017/10/17 08:44 by Per Møller