Dise Premium comes with an built-in web server. The server provides information and control by a standard REST format. To access a player using the HTTP API do the following:
- First make sure the player has enabled the web server.
- Open a web browser and enter "http://[player IP or hostname]:8080". A web page should appear. If you get a 404 error, please make sure the player has a network connection.
In the HTTP API, requests that you send to the player either by GET or some other HTTP method. GET requests are generally information about the state of the player, whereas POST or PUT lets you control the playback. When you make a POST or PUT command, make sure the "Content-Type" header is set to "text/xml" ("Content-Type: text/xml")
For the examples given below, we are using curl
TABLE OF CONTENTS
- Command specification
Command specification
/api/
Root folder for the API. Here you get a list of the API functions that are registered.
- GET - Retrieve list of API functions
/api/Replay/
Communication with Dise Replay (Playback enginge). Several instances of Replay on the same player can be controlled by the API - we therefore need to indicate to which instance of Replay to send. This page gives us a list of the Replays on the player and their software ID. Use this ID for all subsequent requests to Replay.
- GET - Retrieve list of Replays and their software IDs.
/api/Replay/[ID]
When we refer to "[ID]", it is the software ID that needs to be specified (see above for how to get the software ID).
An example is: {DC61460D-37BD-420F-B859-F21E25B2BC82}
When making a HTTP request, the { and } need to be replaced with %7B and %7D, respectively, making it: %7BDC61460D-37BD-420F-B859-F21E25B2BC82%7D
- GET - Basic information (settings, display schemes, etc)
Response format (GET)
<Replay> <Instance name="[ID]"> <FriendlyName>[Replay-name]</FriendlyName> <DisplayScheme>[path-to-displayscheme]</DisplayScheme> </Instance> </Replay>
/api/Replay/[ID]/Playback
- GET - Gets the playback status (stopped, playing, pause, display scheme, forward, backward)
- PUT - Send a command to the playback engine (play, stop, pause, forward, backward)
Request format (PUT)
<Request> <Playback> <Command>[Play|Stop|Pause|Forward|Backward]</Command> </Playback> </Request>
Example: Send command to pause (using curl)
curl -H "Content-Type:text/xml" -X PUT --data "<Request><Playback><Command>Pause</Command></Playback></Request>" \ http://localhost:8080/api/Replay/%7BDC61460D-37BD-420F-B859-F21E25B2BC82%7D/Playback/
/api/Replay/[ID]/Screenshot
- GET - Get the current playing screenshot.
The following GET parameters can be sent along with the Screenshot request:- width
The width of the screenshot, in pixels. When this is set, the height will be set automatically to keep the aspect ratio. - height
The height of the screenshot, in pixels.
- width
Example: Get a 200 pixels wide thumbnail screenshot (using curl)
curl -X GET http://localhost:8080/api/Replay/%7BDC61460D-37BD-420F-B859-F21E25B2BC82%7D/Screenshot?width=200
/api/Replay/[ID]/Log
- GET - Get the latest log information.
/api/Replay/[ID]/OSD
- GET - Get information about the On Screen Display.
- PUT - Set On Screen Display settings.
Request format (PUT)
<Request> <OSD> <OSDLevel>1</OSDLevel> <OSDColor>255</OSDColor> </OSD> </Request>
Example: Show the OSD page with playback information (using curl)
curl -H "Content-Type:text/xml" -X PUT --data "<Request><OSD><OSDLevel>2</OSDLevel></OSD></Request>" \ http://localhost:8080/api/Replay/%7BDC61460D-37BD-420F-B859-F21E25B2BC82%7D/OSD
/api/Replay/[ID]/Variables
- GET - List current variables
/api/Replay/[ID]/Variables/[variable-name]
- PUT - Set a variable with the name variable-name.
- DELETE - Remove the variable variable-name.
Request format (PUT)
<Request> <[variable-name] Persistent="true"> "Value" </[variable-name]> </Request>
Example: Variable management (using curl)
curl -H "Content-Type:text/xml" -X PUT --data "<Request><MyVar Persistent='false'>Value</MyVar></Request>" \ http://localhost:8080/api/Replay/%7BDC61460D-37BD-420F-B859-F21E25B2BC82%7D/Variables/MyVar
Example: Delete variable (using curl)
curl -X DELETE http://localhost:8080/api/Replay/%7BDC61460D-37BD-420F-B859-F21E25B2BC82%7D/Variables/MyVar
/api/Probe/
Communication with Dise Probe. This page gives us a list of the Probes on the player and their software ID. Use this ID for all subsequent requests to Probe.