DISE Replay comes with an builtin web server. The server provides information and control by a standard REST format. To access a player using the HTTP API:
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.
Root folder for the API. Here you get a list of the API functions that are registered.
Communication with DISE Replay. 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.
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: {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.
<Replay> <Instance name="[ID]"> <FriendlyName>[Replay-name]</FriendlyName> <DisplayScheme>[path-to-displayscheme]</DisplayScheme> </Instance> </Replay>
Note: This command will be sent to all channels. To effect only one channel, see /api/Replay/[ID]/Playback/Channel/[channel-name] below.
<Request> <Playback> <Command>[Play|Stop|Pause|Forward|Backward]</Command> </Playback> </Request>
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/
Channel management
command of the selected channel
<Request> <Playback> <Channel> <Command>[Play|Stop|Pause|Unpause|LoopScene|RestartScene|Forward|Backward]</Command> </Channel> </Playback> </Request>
curl -H "Content-Type:text/xml" -X PUT --data "<Request><Playback><Channel><Command>Forward</Command></Channel></Playback></Request>" \ http://localhost:8080/api/Replay/%7BDC61460D-37BD-420F-B859-F21E25B2BC82%7D/Playback/Channel/News
<Request> <DisplayScheme>[path-to-displayscheme]</DisplayScheme> </Request>
curl -H "Content-Type:text/xml" -X PUT --data "<Request><DisplayScheme>C:\DISEContent\Destinations\Default\Player1.displayscheme</DisplayScheme></Request>" \ http://localhost:8080/api/Replay/%7BDC61460D-37BD-420F-B859-F21E25B2BC82%7D/DisplayScheme
curl -X GET http://localhost:8080/api/Replay/%7BDC61460D-37BD-420F-B859-F21E25B2BC82%7D/Screenshot?width=200
<Request> <OSD> <OSDLevel>1</OSDLevel> <OSDColor>255</OSDColor> </OSD> </Request>
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
<Request> <[variable-name] Persistent="true"> Value </[variable-name]> </Request>
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
curl -X DELETE http://localhost:8080/api/Replay/%7BDC61460D-37BD-420F-B859-F21E25B2BC82%7D/Variables/MyVar
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.