TMA1 - API Test Page

This pages is designed to show the use and output of most of the API functions.
Some functions requiring specific input like changing channels or commencing playback are not represented in this test.

The complete syntax is as follows:
"<PVR IP>:8000/api?function=fff&action=aaa[&module=mmm&session=sss]!param1=data1&param2=data2&etc&etc&"
where:

fffFunction name
aaaAction name
mmmNot yet implemented - Optional module name (in integration with other TAPs)
sssNot yet implemented - Session ID (for future security)
"!"separates the command from the parameters.
Parameters are separated by "&" characters with a trailing "&".

PVR Configuration

/api?function=config&action=get!

ObjectValue
contentValue
sysidValue
deviceValue
apptypeValue
remotetypeValue
maxrecstreamsValue
versionValue
recextensionValue
language_codeValue
utftoppyValue
tma1verValue
blockfactorValue
autoppyValue
utcoffsetValue
dstValue
pre_paddingValue
post_paddingValue
hddmodelValue
hddserialValue
hddfirmwareValue
pvrnameValue
logginglevelValue
module_countValue
timestampValue

PVR Status

/api?function=status&action=get!

There is a fixed portion for overall status and playback status.

There is an array portion for each recording slot that the PVR supports. These properties are a sub-property of the "recording" property.

There is an array portion for each external drive attached. These properties are a sub-property of the "drives" property.

PVR Channel Listing

/api?function=channel&action=get!

There is a fixed portion with the current channel and channel count.

There is an array portion for each channel. These properties are a sub-property of the "channels" property.

PVR Timers Listing

/api?function=timers&action=get!

There is a fixed portion with the timer count.

There is an array portion for each timer. These properties are a sub-property of the "timers" property.

PVR Files Listing

/api?function=files&action=get!

There is a fixed portion with the directory name and file count.

There is an array portion for each file. These properties are a sub-property of the "files" property.

TO DO - Add INF+ status to the standard files response.

TO DO - Function to delete and move recordings.

Store and retrieve settings on the PVR

This set of functions allows JavaScript to save settings to the PVR and retrieve them later.
Settings are stored on the PVR in "/ProgramFiles/Settings/TMA1/TMA1-Client.ini."
All settings are stored as strings. They must be converted back to numbers if required.
A request for a key that does not exist will return a null string.

/api?function=setting&action=set!key=apitest01&value=test value&

/api?function=setting&action=get!key=apitest01&

/api?function=setting&action=delete!key=apitest01&

/api?function=setting&action=get!key=apitest01&

/api?function=setting&action=list!

There is a fixed portion with the setting count.

There is an array portion with the actual settings. These properties are a sub-property of the "setting" property.

Favourites Listing

/api?function=favourites&action=get!

There is fixed portion that contains some general information and an array portion called "groups".

There is another fixed portion within each groups, and then an array called "services" containing a list of the services in that group.

Directory Tree Listing

/api?function=files&action=tree!

There is a fixed portion with the directory count.

There is an array portion with the actual directories. These properties are a sub-property of the "directory" property.

Logo Sprite File

/api?function=channel&action=getlogos!

There is a fixed portion with the logo count.

There is an array portion with the actual channel IDs and logo coordinates. These properties are a sub-property of the "logos" property.



Get EPG Data

/api?function=epg&action=get!chtype=<x>&chnum=<y>&starttime=<yyyy/mm/dd hh:mm:ss>&endtime=<yyyy/mm/dd hh:mm:ss>&

There is a fixed portion with the EPG event count.

There is an array portion with the actual EPG data. These properties are a sub-property of the "event" property.

Show events for the next 4 hours on the first TV service.

TAPs Running

/api?function=tap&action=get!

There is a fixed portion with the TAP count.

There is an array portion with the actual TAP data. These properties are a sub-property of the "tap" property.

End of API test.