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
  • Grid parameters
  • Grid filters
  • Load parameters

Was this helpful?

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

Common Parameters

PreviousAPI DescriptionNextAccess

Last updated 1 year ago

Was this helpful?

Grid parameters

API calls which end in /grid, with the exception of , have a common set of parameters:

  • start First entry to include. Default is the first (0).

  • limit Number of entries to include. Default is 50 - use a large number to get all.

  • filter A JSON object describing the filter(s) to be applied. See Grid Filters below for syntax.

  • sort Name of the field to sort the records by. A case-sensitive sort is used.

  • dir if sort is specified then dir=desc produces a reverse sort.

Grid filters

A filter can be applied to the output using a JSON object. The syntax is:

filter=[
            {
                "field" : "<fieldname>",
                "type"  : "string|numeric|boolean",
                "value" : "<value>",
                "comparison" : "gt|lt|eq",
                "intsplit" : <intsplit>
             }, ...
        ]

The "comparison" field is only used with numeric data. A "gt" comparison actually matches on greater-or-equal, and "lt" on less-or-equal.

Boolean values must be specified as "0" or "1" (NOT "true" or "false"). A (case-insensitive) regular expression match is used for strings.

The "intsplit" field is used for integer variables which are used to store a quotient and remainder, and defines how the bits of the variable are allocated.

Multiple filters can be applied to a query ONLY if they refer to different fields, so for example it is not possible to query for EPG events having start times between two values.

Load parameters

  • meta If > 0 an extra data structure is output, mostly related to the format of the GUI screen where the information is presented. Default is 0.

  • list This parameter selects which items in the params array are to be output, based on the value of the 'id' field. Multiple entries can be selected, separated by commas, colons or semicolons. A '-' in front of an entry deselects that item (and implicitly selects all others).

API calls which end in /load, with the exception of , have a common set of parameters:

epg/events/grid
epg/events/load