Media Server API Documentation

Version 3.3.1 – July 2025
Consolidated from all change logs and original RecordingService.md

All functions are guaranteed to work with Media Server 3.3.1 or later.
For problems, please post in the official Forum.


1. General Information

Base URL

http://[user]:[password]@[IP]:[port]/api/

2. Status Information

2.1 Version

GET /api/version.html

Response (XML):

<version iver="18939904" inst="0" ires="0">
  DVBViewer Recording Service 1.33.0.0 (beta) (PC-NAME)
</version>

2.2 Status2

GET /api/status2.html

Response (XML):

<status>
  <timercount>0</timercount>
  <reccount>0</reccount>
  <nexttimer>-1</nexttimer>
  <nextrec>-1</nextrec>
  <streamclientcount>0</streamclientcount>
  <rtspclientcount>0</rtspclientcount>
  <unicastclientcount>0</unicastclientcount>
  <lastuiaccess>13</lastuiaccess>
  <standbyblock>1</standbyblock>
  <tunercount>0</tunercount>
  <streamtunercount>0</streamtunercount>
  <rectunercount>0</rectunercount>
  <epgudate>0</epgudate>
  <rights>full</rights>
  <recfiles>2</recfiles>
  <recfolders>
    <folder size="1445946646528" free="15966986240">
      E:\Recorded TV
    </folder>
    <folder size="57404289024" free="3202850816">
      C:\Users\Public\Recorded TV
    </folder>
  </recfolders>
  <timezone>120</timezone>
</status>

3. Configuration Files – Settings

3.1 getconfigfile

GET /api/getconfigfile.html?file=[relativePath]

Examples
curl:

curl -u user:pass "http://192.168.1.2:8089/api/getconfigfile.html?file=config%5Cservice.xml"

Python:

import requests
url = "http://192.168.1.2:8089/api/getconfigfile.html"
params = {"file": r"config\service.xml"}
r = requests.get(url, params=params, auth=("user", "pass"))
print(r.text)

3.2 setting

GET /api/setting.html?sec=[section]&id=[identifier]&def=[default]

Returns plain text value of the requested key.

Example
Get streaming port:

http://user:pass@192.168.1.2:8089/api/setting.html?sec=WebGeneral&id=StreamPort&def=7522

4. Channel/Favourite List

4.1 getchannelsxml

GET /api/getchannelsxml.html

Query Parameters (all optional):

ParamTypeDefaultMeaning
rootsonly=1int0Only root nodes
group=[Name]strFilter by category
id=[ChannelID]intSingle channel
logo=1int0Include logo URLs
rtsp=1int0Include RTSP URLs
upnp=1int0Include UPnP URLs
subchannels=1int0Include audio subchannels
tvonly=1int0Only TV (since 2.0)
radioonly=1int0Only radio (since 2.0)
epgonly=1int0Only channels with EPG (since 2.0)
fav=0/1intOverride “add favorites” setting
favonly=0/1intOverride “favorites only” setting

Changes

Example
Return only TV favorites with logos:

curl -u user:pass "http://192.168.1.2:8089/api/getchannelsxml.html?tvonly=1&favonly=1&logo=1"

4.2 getlogoassignment

GET /api/getlogoassignment.html?name=[ChannelName]&id=[EPGChannelID]

Example

curl "http://192.168.1.2:8089/api/getlogoassignment.html?name=Das%20Erste&id=562954315180093"

5. Media Files

5.1 mediafiles / mediafiles2

GET /api/mediafiles.html or /api/mediafiles2.html (mediafiles2 triggers 404 on old servers)

Parameters:

ParamTypeDefaultMeaning
video=1int1Video database
audio=1int0Audio database
photo=1int0Photo database
dirid=nint-1Directory ID
content=1/2/3int11=files, 2=directories, 3=both
recursive=1int0Walk sub-dirs
thumbs=1int0Include thumbnail URLs
m3u=1int0Return M3U playlist

Example
List all audio files recursively as M3U:

curl -u user:pass "http://192.168.1.2:8089/api/mediafiles.html?audio=1&recursive=1&m3u=1"

5.2 sideload

GET /api/sideload.html

Parameters:

ParamTypeDefaultMeaning
video/audio/photo/rec=1intvideo=1Media type
dirid=nintDirectory ID
fileid=nintFile/recording ID (same as dirid for recordings)
file=[name]strUTF-8 filename or mask (* allowed)
download=1int0Force download header

Examples
Download recording log:

curl -u user:pass "http://192.168.1.2:8089/api/sideload.html?rec=1&fileid=10&file=.log&download=1"

6. Streaming

6.1 M3U Playlists

GET

Channel List Download Parameters (apply to all three URLs):

ParamTypeDefaultMeaning
tv=0/1intuserInclude TV channels
radio=0/1intuserInclude radio channels
fav=0/1intuserAdd favorites on top
favonly=0/1intuserOnly favorites
tags=ninttweakBit field for EXTINF tags (see 2.1.5)
tvpreset / rpresetint/strTranscoding preset
hls=0/1intUA-basedPreset file selection

tags bit values (add together):
1 = category in name
2 = group-title on change
4 = group-title always
8 = tvg-logo URL
16 = tvg-id
32 = tvg-name
64 = tvg-chno

Example
HLS TV favorites only, second preset:

http://192.168.1.2:8089/transcodedchannels.m3u?tvpreset=1&hls=1&favonly=1

6.2 HLS

Parameters documented in transcoding_params_en.txt (not repeated here).

6.3 Permanent Transcoded TS

Start
GET /api/startts.html?streamid=[unique_name]&chid=[...]&...

Stop
GET /api/stopts.html?streamid=[unique_name]

Client URL:

/flashstream/stream.ts?streamid=[unique_name]

6.4 RTSP / Live Permanent UDP/RTP

GET /rtp/?ip=[dest]&port=[p]&chid=[...]&...


7. Recordings

7.1 recordings

GET /api/recordings.html

Parameters:

ParamTypeDefaultMeaning
utf8=1int0UTF-8 response
nofilename=1int0Exclude filenames
images=1int0Include thumbnails
id=[recid]intSingle recording

Example

curl -u user:pass "http://192.168.1.2:8089/api/recordings.html?utf8=1&images=1"

7.2 recdelete

GET /api/recdelete.html

Parameters (one required):

Returns 423 Locked if recording active.
Bulk delete error status refers only to last failure.

Examples
Delete multiple recordings:

curl -u user:pass "http://192.168.1.2:8089/api/recdelete.html?recid=12,17,3&delfile=1"

Delete by filename:

curl -u user:pass "http://192.168.1.2:8089/api/recdelete.html?recfile=E%3A%5CRecorded%20TV%5CMyShow.ts&delfile=1"

7.3 recordstats

GET /api/recordstats.html?id=[timerID]

Response (XML attributes only):

<recordstats rate="8123456" size="1234567890" totalsize="1234567890"
             disksize="1445946646528" diskfree="15966986240"
             runtime="1800000" errors="0" vtotal="1234567890"
             vremoved="0" devicename="DVB-S2 TBS 6981"
             pids="3,101,2,102,4,103,15" />

8. EPG

8.1 epg

GET /api/epg.html

Parameters:

ParamTypeDefaultMeaning
lvl=2intrequiredDetail level
channel / chlistComma-separated EPG Channel IDs
start / endfloatDelphi TDateTime range (local)
isostart / isoendISOISO8601 alternative (since 3.2.2)
utc=1int0All times in UTC (since 2.0)
search=[term]strSearch phrase
options=[TSD]strT=title, S=subtitle, D=description
eventid=[id]intExact Event ID (since 2.0)
pdc=[hex]hexPDC search (since 2.0)
xmltv=1int0XMLTV compliant output (since 2.1.5)
source=nint0Bit mask to exclude sources (1=DVB,2=MHW,4=External)
xgrab=[file]strINI grab file in config subdir (since 2.1.5)

Changes

Example
UTC XMLTV for two channels:

curl "http://192.168.1.2:8089/api/epg.html?channel=562954315180093,562954314656614&xmltv=1&utc=1"

8.2 epgclear

GET /api/epgclear.html?source=[Sources]

8.3 EPGimport

POST http://[user:pass@]IP:port/cgi-bin/EPGimport

8.4 epgstatus

GET /api/epgstatus.html

Response:

<epgstatus>
  <epglang>en</epglang>
  <timezone>120</timezone>
  <importstate>0</importstate>
  <epgcount>45230</epgcount>
  <nextupdate>20250722013000</nextupdate>
  <updatetotalcount>0</updatetotalcount>
  <updatecount>0</updatecount>
</epgstatus>

9. Timer Management

9.1 timerlist

GET /api/timerlist.html

Parameters:

ParamTypeDefaultMeaning
utf8=0/1/2int00=ANSI, 1=UTF-8, 2=UTF-8+channel name
id=[timerID]intSingle timer
recid=[id]intTimer that created recording
reconly=1int0Timers with ongoing recordings
enabledonly=1int0Active (non-disabled) timers
withtimeshift=1int0Include timeshift timers (since 3.0.0)

Response additions since 3.0.0

9.2 timeradd

GET /api/timeradd.html

Parameters:

ParamTypeDefaultMeaning
chintrequiredChannel ID (32/64-bit)
dor / isodatedaterequiredRecording date
start / isostarttimerequiredStart (minutes since midnight or ISO)
stop / isostoptimerequiredStop (…)
isodur / durintDuration in minutes (alternative)
enable=0/1intrequiredEnable timer
titlestrTimer name
daysstr7-char weekday mask
action=0/1int00=Record, 1=Tune
prio=0-100int50Priority
schemestrFile naming scheme (since 2.0)
encodingstrCharacter encoding for scheme/title/folder/series
timeshift=0/1int0Timeshift flag (since 3.0.0)

Changes

Example
Add daily timer in ISO format:

curl -u user:pass "http://192.168.1.2:8089/api/timeradd.html?ch=562954315180093&isodate=2025-07-21&isostart=20:15&isostop=21:45&enable=1&title=Evening%20News"

9.3 timeredit

GET /api/timeredit.html

Same parameters as timeradd plus id=[timerID] (mandatory).
Changes same as timeradd.

9.4 timerdelete

GET /api/timerdelete.html

Parameters:

9.5 timerrestart

GET /api/timerrestart.html?id=[timerID]


10. EPG Search Presets

10.1 searchlist

GET /api/searchlist.html

Parameters:

ParamTypeDefaultMeaning
content=0/1/2/3int00/1=presets only, 2=default only, 3=both (since 2.1.3)

Response:

<searches ver="2">
  <search id="123" ...> ... </search>
</searches>

10.2 searchadd / searchedit / searchdelete

GET endpoints:

Common Parameters (URL query):

ParamTypeDefaultMeaning
SearchPhrasestrRequired for add
NamestrPreset name
SearchFieldsint3Bit 0=title,1=subtitle,2=desc
IgnoreCaseint-11=ignore case
UseRegExint01=regex
Daysint127Bit mask Mon-Sun
StartDate / isostartdatedateISO or dd.mm.yyyy
EndDate / isoenddatedate
StartTime / isostarttimetimehh:mm or ISO
EndTime / isoendtimetime
DurationMin / Maxint0Minutes
Genreint-1Genre filter
ChannelscsvEPG Channel IDs
AutoRecordingint0Create auto-timers
recseries=1int0Strip season/episode (since 2.1.3)
checkdup=1int0Skip duplicates (since 2.1.3)
record=1int0Create timers immediately (since 2.1.3)
recformatintTV recording format (0/1/2)
recradioformatintRadio recording format (0/1)
incremoved=1int1Include removed recordings (since 2.1.0)
SeriesstrSeries grouping string

(Additional recording-specific parameters identical to timeradd.)

Changes


11. Tasks & System Control

11.1 tasks

GET /api/tasks.html

ParamTypeMeaning
task=[name]strExecute task
action=[name]strAlias for task
all=1intList all internal tasks (since 2.1.0)
action=cancelstrCancel delayed shutdown/hibernate (since 2.1.0)

Returned task list (XML) when no parameters:

<tasklist>
  <group name="EPG">
    <task type="0">
      <name>Start EPG Update</name>
      <action>EPGStart</action>
    </task>
  </group>
</tasklist>

Built-in tasks:
EPGStart, Hibernate, Standby, Shutdown, AutoTimer

11.2 dvbcommand

GET /api/dvbcommand.html


12. SQLite Read-Only Access

GET /api/sql.html?[video/audio/photo/rec]=1&query=[SQLite query]

Example
Count video files:

curl -u user:pass "http://192.168.1.2:8089/api/sql.html?video=1&query=SELECT COUNT(*) FROM video"

13. Key-Value Store (Add-ons)

GET /api/store.html

Actions:

ActionRequired ParametersMeaning
writesec, key, valueStore value
readsec, keyRetrieve value (plain text)
deletesec, key (optional)Delete key/section
updatefileFlush to config\AddOnStore.xml

Example
Write:

curl "http://192.168.1.2:8089/api/store.html?action=write&sec=myAddon&key=volume&value=75"

14. Subtitle Delivery

Since 2.1.0 the servers deliver SRT files matching video URLs:

Replace extension:

/upnp/video/388.mkv  →  /upnp/video/388.srt

15. Deprecated and Obsolete API Calls

Deprecated CallReplacementNotes
/api/status.html/api/status2.htmlAll data moved to status2
/tasks.html?task=.../api/tasks.html?task=...Unified endpoint
/index.html?epg_clear=true/api/epgclear.html?source=...Full source control
/api/getchannelsdat.html/api/getconfigfile.html or /api/getchannelsxml.html
/api/getdiseqcxml.html/api/getconfigfile.html?file=DiSEqC.xml
/api/getfavourites.html/api/getconfigfile.html or /api/getchannelsxml.html
/api/shutdown.html/api/tasks.html?action=cancel or task=ShutdownMerged into tasks