-
Notifications
You must be signed in to change notification settings - Fork 0
API Documentation
On this wiki page all api commands are described.
The commands are used to connect to the api running on the local system, change the 127.0.0.1 to you api IP, if it is on a remote system.
This is the star point of the api. You only get header links to other api endpoints here.
Command: GET http://127.0.0.1:8080/api
Lists header links to all controller commands.
Command: GET http://127.0.0.1:8080/api/control
Starts playing on all player instances.
Command: POST http://127.0.0.1:8080/api/control/play
Pauses all player instances.
Command: POST http://127.0.0.1:8080/api/control/pause
Stops playing on all player instances.
Command: POST http://127.0.0.1:8080/api/control/stop
Restarts current title on all player instances.
Command: POST http://127.0.0.1:8080/api/control/reset
Plays previous title on all player instances.
Command: POST http://127.0.0.1:8080/api/control/backward
Toggles shuffle on all player instances.
Command: POST http://127.0.0.1:8080/api/control/shuffle
Toggles full screen on all player instances.
Command: POST http://127.0.0.1:8080/api/control/fullscreen
Toggles repeat on all player instances
Command: POST http://127.0.0.1:8080/api/control/repeat
Plays next tile on all player instances
Command: POST http://127.0.0.1:8080/api/control/forward
Outputs the current state of the master.
Command: GET http://127.0.0.1:8080/api/control/state
Shows the volume of the master.
Command: POST GET://127.0.0.1:8080/api/control/volume
Sets the volume of the master.
Command: POST http://127.0.0.1:8080/api/control/volume
Outputs all infos about all player instances as JSON.
Command: GET http://127.0.0.1:8080/api/instances
possible output:
[
{
"host": "127.0.0.1",
"name": "local_device",
"port": 4212,
"responseTime": 0,
"state": "paused",
"title": "https://mp3l.jamendo.com/?trackid=1161920&format=mp31&from=app-3dce8b55",
"volume": 256
},
{
"host": "0.0.0.0",
"name": "fail_test",
"port": 0,
"responseTime": -1,
"state": "undefined",
"title": "no title",
"volume": -1
}
]
Reconnects all player instances.
Command: POST http://127.0.0.1:8080/api/instances/reconnect
Outputs all infos about all player instances as JSON.
Command: GET http://127.0.0.1:8080/api/instances/single/<instanceName>
Parameter:
- instanceName: Name of the instance as provided in player.json
possible output (for GET http://127.0.0.1:8080/api/instances/single/local_device):
[
{
"host": "127.0.0.1",
"name": "local_device",
"port": 4212,
"responseTime": 0,
"state": "paused",
"title": "https://mp3l.jamendo.com/?trackid=1161920&format=mp31&from=app-3dce8b55",
"volume": 256
}
]
Starts playing on a special player instances.
Command: POST http://127.0.0.1:8080/api/instances/single/<instanceName>/play
Parameter:
- instanceName: Name of the instance as provided in player.json
Pauses a special player instances.
Command: POST http://127.0.0.1:8080/api/instances/single/<instanceName>/pause
Parameter:
- instanceName: Name of the instance as provided in player.json
Stops playing on a special player instances.
Command: POST http://127.0.0.1:8080/api/instances/single/<instanceName>/stop
Parameter:
- instanceName: Name of the instance as provided in player.json
Restarts current title on a special player instance.
Command: POST http://127.0.0.1:8080/api/instances/single/<instanceName>/reset
Parameter:
- instanceName: Name of the instance as provided in player.json
Plays previous title on a special player instances.
Command: POST http://127.0.0.1:8080/api/instances/single/<instanceName>/backward
Parameter:
- instanceName: Name of the instance as provided in player.json
Toggles shuffle on a special player instances.
Command: POST http://127.0.0.1:8080/api/instances/single/<instanceName>/shuffle
Parameter:
- instanceName: Name of the instance as provided in player.json
Toggles full screen on a special player instances.
Command: POST http://127.0.0.1:8080/api/instances/single/<instanceName>/fullscreen
Parameter:
- instanceName: Name of the instance as provided in player.json
Toggles repeat on a special player instances
Command: POST http://127.0.0.1:8080/api/instances/single/<instanceName>/repeat
Parameter:
- instanceName: Name of the instance as provided in player.json
Plays next tile on a special player instances
Command: POST http://127.0.0.1:8080/api/instances/single/<instanceName>/forward
Parameter:
- instanceName: Name of the instance as provided in player.json
Outputs the current state of the special player instance.
Command: GET http://127.0.0.1:8080/api/instances/single/<instanceName>/state
Parameter:
- instanceName: Name of the instance as provided in player.json
Shows the volume of a special player instance.
Command: POST GET://127.0.0.1:8080/api/instances/single/<instanceName>/volume
Parameter:
- instanceName: Name of the instance as provided in player.json
Sets the volume of a special player instance.
Command: POST http://127.0.0.1:8080/api/instances/single/<instanceName>/volume
Parameter:
- instanceName: Name of the instance as provided in player.json
Shows all endpoints with server information.
Command: GET http://127.0.0.1:8080/api/server
Shows all host adresses of the server. The qr value is a link to a qr code with a link to this host address.
Command: GET http://127.0.0.1:8080/api/server/host
possible output:
[
{
"host": "http://1.2.3.4:8080",
"qr": "http://127.0.0.1:8080/api/server/host/0"
},
{
"host": "http://[abcd:0:0:0:0:abcd:abcd:abcd]:8080",
"qr": "http://127.0.0.1:8080/api/server/host/1"
}
]
Command: GET http://127.0.0.1:8080/api/server/host/0
possible output: QR code representation of host address 0