LogoLogo
ForumCodeDonate
  • Introduction
    • About
    • Release / Change Log
  • Installation
    • Requirements
    • Tuners
    • Linux
    • Virtualisation - Proxmox
    • Docker
    • NAS
    • Android
  • SETUP
    • Stages
    • Concepts
    • Muxes/Scan Files
      • Scan Files
      • Using w_scan Scan Files
  • CONFIGURATION
    • Concepts
    • Electronic Program Guide
    • Digital Video Recorder
    • Web User Interface Customisation
      • Theme
      • Date/Time Format
  • HTTPS access via Reverse Proxy
  • APPENDICES
    • FAQ
    • CLI Commands
    • Debugging
  • Development
    • Compiling
      • Compiling TVH with VAAPI Support
        • for Lubuntu 24.04
        • for Lubuntu 22.04
        • Level 2
    • HTSP
      • General
      • HTSMSG Binary Format
      • Communication
      • Client to Server (RPC) methods
      • Server to Client methods
      • Protocol Changes
      • HTTP Proxy Examples
    • JSON API
      • API Description
        • Common Parameters
        • Access
        • Bouquet
        • Caclient
        • Channel
        • Codec
        • Config
        • DVR
        • EPG
        • EPGgrab
        • ESfilter
        • idnode
        • Input
        • intlconv/charsets
        • Language
        • MPEGts
        • Profile
        • RatingLabel
        • Raw
        • Satip
        • Service
        • Status
        • Timeshift
        • Tvhlog
      • Examples
      • Other Functions
      • WebSocket
    • Object Class Relationships
    • Testing Tuners Using Files
    • Translations
    • Programmers Translation Workflow
    • XMLTV
      • Input
        • Recognised Tags/Attributes
        • Episode Numbering
      • Output
    • Object ID Representation
    • WebUI Help Content Workflow
    • Random Notes
  • Creating a Mux Dump
  • WIP
    • Release / Change Log Mockup
Powered by GitBook

© Tvheadend 2006-2024

On this page
  • channel/class
  • channel/create
  • channel/grid
  • channel/list
  • channel/rename
  • channeltag/class
  • channeltag/create
  • channeltag/grid
  • channeltag/list
  • channelcategory/list

Was this helpful?

Export as PDF
  1. Development
  2. JSON API
  3. API Description

Channel

PreviousCaclientNextCodec

Last updated 1 year ago

Was this helpful?

Functions to query and manipulate the list of channels.

A TVH user can only see via the API those channels which have been enabled and to which access has been allowed. However a user with ADMIN privilege can use the parameter all=1 to see details of every channel, channeltag and category even if they do not have access to them.

channel/class

Lists the text strings, options and defaults used when configuring channels within TVH (ie Configuration -> Channel/EPG -> Channel -> Add).

channel/create

Creates a new channel. Requires ADMIN privilege.

  • conf A JSON object containing details of the new channel.

channel/grid

Lists details of channels. For details of the parameters and selection criteria which can be applied, see .

{
   "entries" : [
      {
         "dvr_pst_time" : 0,
         "enabled" : true,
         "epgauto" : true,
         "autoname" : true,
         "name" : "BBC RB 1",
         "number" : 601,
         "tags" : [
            "21d5fe751062c4d99997d6cb48f43c55",
            "1a2a61c4374cedb1fc29417f1a517446"
         ],
         "services" : [
            "9b0e2e103a373350f5e99cda6dd3f055"
         ],
         "epg_running" : -1,
         "epggrab" : [],
         "uuid" : "ae63d3b40fbfab610f49290abc189472",
         "bouquet" : "",
         "dvr_pre_time" : 0
      }, ...
   ],
   "total" : 104
}

channel/list

Lists the names and uuids of all known channels. For disabled channels the channel name is enclosed in braces.

These parameters were added at version 4.3-905:

  • numbers If non-zero, the LCN appears before the channel name, separated by a space. Default is zero.

  • sources If non-zero, the source appears after the channel name, in square brackets and separated by a space. Default is zero.

  • sort Either name to sort by channel name, or numname to sort by LCN then by name (default). The name sort is case-sensitive.

{
   "entries" : [
      {
         "val" : "Channel 5+1",
         "key" : "7e7b77801531c803f5ce8f4d5003f44c"
      }, ...
   ]
}

channel/rename

Renames a channel. Only available from version 4.3.652. Requires ADMIN privilege.

  • from The current name of the channel.

  • to The new name of the channel.

channeltag/class

Lists the text strings, options and defaults used when configuring channels within TVH (ie Configuration -> Channel/EPG -> Channel Tags -> Add).

channeltag/create

Creates a new channel tag. Requires ADMIN privilege.

  • conf A JSON object containing details of the new channel tag.

channeltag/grid

{
   "total" : 5,
   "entries" : [
      {
         "index" : 0,
         "private" : false,
         "icon_public_url" : "",
         "internal" : false,
         "name" : "Radio",
         "titled_icon" : false,
         "enabled" : true,
         "uuid" : "3479ac5a48d6680fc37d8b411cf0e2e8",
         "icon" : "",
         "comment" : ""
      }, ...
   ]
}

channeltag/list

Lists the names and uuids of all channel tags.

{
   "entries" : [
      {
         "key" : "3479ac5a48d6680fc37d8b411cf0e2e8",
         "val" : "Radio"
      }, ...
   ]
}

channelcategory/list

Untested. Return a list of the categories of events which appear in the current EPG and which the user is permitted to see. Used internally to populate the 'Category 1-3' drop-down boxes in DVR -> Autorecs -> Add (Expert view only). The function only works if the EPG is sourced from XMLTV.

Lists details of channel tags. For details of the parameters and selection criteria which can be applied, see .

Grid Parameters
Grid Parameters