2014-08-13, 10:38
Good examples are always welcome. It can also be useful putting the responses into json-csv.com to view the output clearly.
(2014-06-22, 18:28)tonilundin Wrote: Example for turning off system?
curl -s --data-binary '{"jsonrpc": "2.0", "method": "System.Suspend", "id":1}' -H 'content-type: application/json;' http://$xbmcAddress:9001/jsonrpc
curl --user foo:bar --header 'Content-Type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.GetActivePlayers" }' 'http://192.168.1.127/jsonrpc'
{"id":1,"jsonrpc":"2.0","result":[{"playerid":2,"type":"picture"}]}
curl --user foo:bar --header 'Content-Type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Stop", "params": { "playerid": 2 } }' 'http://192.168.1.127/jsonrpc'
{"id":1,"jsonrpc":"2.0","result":"OK"}
curl --user foo:bar --header 'Content-Type: application/json' --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Open", "params": {"item": { "path": "/media/PERRY/Picks" } } }' 'http://192.168.1.127/jsonrpc'
{"id":1,"jsonrpc":"2.0","result":"OK"}
curl --user user:pass https://xyz.com/a
curl.exe -i -X POST -d "{\"jsonrpc\": \"2.0\", \"method\": \"VideoLibrary.Export\", \"params\": { \"path\": \"d:\\temp\", \"overwrite\": false, \"actorthumbs\": true, \"images\": true }, \"id\": \"libMovies\"}" -H "content-type:application/json" http://xbmc:[email protected]:80/jsonrpc rem > NUL 2>&1
(2014-11-06, 05:40)VeggieVampire Wrote: Great examples here is a little more to add to them with just changing the beginning of the string. So no need for typing in usernames and passwords.
//Play a single video from file. change everything in bold.
http://user:pass@xbmcIP:xbmcPort/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"file:///C:/PATH/FILE"}}}
(2015-04-27, 04:40)nellie7878 Wrote: Is it possible to submit a library search query through a JSON command?
(2015-06-04, 01:11)regystro Wrote: Anyone knows how to set audio delay? (The one you can change by pressing "A" key during video playback).
I've been trying with Input.ExecuteAction {"action":"audiodelay"} but it only shows the audio offset selector on the GUI. Any chance to set and/or get current audio offset value?
I've used JSONRPC.Introspect to get all settings, but haven't found any to change this value.
Thanks in advance.