Client to Server (RPC) methods
hello
Used to identify the client toward the server and to get the session challenge used to hash passwords into digests. The client can request a different version of the HTSP protocol with this method. If no 'hello' message is sent the server assumes latest version is to be used.
Client/Server should select lowest common version, if this is not possible connection should be terminated.
Request message fields:
htspversion u32 required Client preferred HTSP version.
clientname str required Client software name.
clientversion str required Client software version.Reply message fields:
htspversion u32 required The server supports all versions of the protocol up to and including this number.
servername str required Server software name.
serverversion str required Server software version.
servercapability str[] required Server capabilities (Added in version 6)
challenge bin required 32 bytes randomized data used to generate authentication digests
webroot str optional Server HTTP webroot (Added in version 8)
Note: any access to TVH webserver should include this at start of URL pathNote: possible values for servercapability[]:
cwc Descrambling available
v4l Analogue TV available
linuxdvb Linux DVB API available
imagecache Image caching available
timeshift Timeshifting available (Added in version 9).authenticate
This can be used to issue authentication without doing anything else. If no privileges are gained it will return with 'noaccess' set to 1.
Request message fields:
Reply message fields:
api
(Added in version 24)
This is a proxy to HTTP API.
Request message fields:
Reply message fields:
Also see: JSON API and Proxy Examples.
getDiskSpace
(Added in version 3)
Return diskspace status from Tvheadend's PVR storage
Request message fields:
Reply message fields:
Also see: JSON API 'comet/poll'.
getSysTime
(Added in version 3)
Return system time on the server.
Request message fields:
Reply message fields:
enableAsyncMetadata
When this is enabled the client will get continuous updates from the server about added, update or deleted channels, tags, dvr and epg entries.
An interactive application that presents the user with information about these things should probably enable this and the implement the various server to client methods.
Request message fields:
Reply message fields:
Once the reply as been sent the initial data set will be provided, and then updates will arrive asynchronously after that. The initial data dump is sent using the following messages:
getChannel
(Added in version 14)
Request information about the given channel.
Request message fields:
Reply message fields:
Also see: JSON API Channel
getEvent
Request information about the given event. An event typically corresponds to a program on a channel.
The language field in the request allows preference for languages to be requested for the various string fields.
Request message fields:
Reply message fields:
Also see: JSON API EPG
getEvents
(Added in version 4)
Request information about a set of events. If no options are specified the entire EPG database will be returned.
Request message fields:
Reply message fields:
epgQuery
(Added in version 4)
Query the EPG (event titles) and optionally restrict to channel/tag/content type.
Request message fields:
Reply message fields:
if full == 1
else
getEpgObject
Get detailed EPG Object info.
Request message fields:
Reply message fields:
getDvrConfigs
(Added in version 16)
Return a list of DVR configurations.
Reply message fields:
Message fields:
Also see: JSON API DVR
addDvrEntry
(Added in version 4)
Create a new DVR entry. Either eventId or channelId, start and stop must be specified.
Request message fields:
Reply message fields:
updateDvrEntry
(Added in version 5)
Update an existing DVR entry.
Request message fields:
Reply message fields:
cancelDvrEntry
(Added in version 5)
Cancel an existing recording, but don't remove the entry from the database.
Request message fields:
Reply message fields:
deleteDvrEntry
(Added in version 4)
Delete an existing DVR entry from the database.
Request message fields:
Reply message fields:
getDvrCutpoints
(Added in version 12)
Get DVR cutpoints.
Request message fields:
Reply message fields:
Cutpoint fields:
addAutorecEntry
(Added in version 13)
Create a new Autorec DVR entry. Title must be specified.
Request message fields:
Reply message fields:
updateAutorecEntry
(Added in version 25)
Update an existing Autorec DVR entry.
Request message fields:
Reply message fields:
deleteAutorecEntry
(Added in version 13)
Delete an existing autorec DVR entry from the database.
Request message fields:
Reply message fields:
addTimerecEntry
(Added in version 18)
Create a new Timerec DVR entry. Title must be specified.
Request message fields:
Reply message fields:
updateTimerecEntry
(Added in version 25)
Update an existing Timerec DVR entry.
Request message fields:
Reply message fields:
deleteTimerecEntry
(Added in version 18)
Delete an existing timerec DVR entry from the database.
Request message fields:
Reply message fields:
getTicket
(Added in version 5)
Get a ticket to allow access to a channel or recording via HTTP
Request message fields:
Reply message fields:
subscribe
Request subscription to the given channel.
Request message fields:
Reply message fields:
unsubscribe
Stop a subscription.
Request message fields:
Reply message fields:
subscriptionChangeWeight
(Added in version 5)
Change the weight of an existing subscription
Request message fields:
Reply message fields:
subscriptionSkip
(Added in version 9)
Skip a timeshift enabled subscription. The response will be asynchronous subscriptionSkip().
Request message fields:
Reply message fields:
subscriptionSeek
(Added in version 9)
Synonym for subscriptionSkip
subscriptionSpeed
(Added in version 9)
Set the playback speed for the subscription. The response will be asynchronous subscriptionSpeed().
Request message fields:
Reply message fields:
subscriptionLive
(Added in version 9)
Return a timeshifted session to live. Reply will be asynchronous subscriptionSkip().
Request message fields:
Reply message fields:
subscriptionFilterStream
(Added in version 12)
Enable or disable specified streams by index.
Request message fields:
Reply message fields:
getProfiles
(Added in version 16)
Return a list of stream profiles (configurations).
Reply message fields:
Message fields:
getCodecs
(Added in version 11, Removed in version 16)
Return a list of encoders (codecs).
Reply message fields:
fileOpen
(Added in version 8)
Open a file within the Tvheadend file system. This is now the preferred method (in place of HTTP) for accessing recordings.
Accessing recordings via HTSP will overcome the limitations of standard HTTP streaming which cannot handle both skipping and growing files (i.e. in-progress recordings) at the same time.
Request message fields:
Valid file paths:
Reply message fields:
fileRead
(Added in version 8)
Read data from a file.
Request message fields:
Reply message fields:
fileClose
(Added in version 8)
Close an opened file.
Request message fields:
Reply message fields:
fileStat
(Added in version 8)
Get status of a file.
Request message fields:
Reply message fields:
fileSeek
(Added in version 8)
Seek to position in a file.
Request message fields:
Note: valid values for whence
Reply message fields:
Last updated
Was this helpful?
