Page 1 of 1

Library refresh via API

PostPosted: Thu May 19, 2016 7:13 am
by mackowiakp
I used for several years script for automatic library refresh, when new file was discover by inotify on my Linux Mageia 5 based server. Serviio server ver 1.6.1
Now it does not work, because Serviio API rapports me an error. Something changed in API call format? As I wrote, it worked for me earlier.

Look for the result of API call:

  Code:
[root@mackowiak Pobrane]# curl -sS -X POST -H "Content-Type: application/xml" -d "<action><name>forceLibraryRefresh</name></action>" http://localhost:23423/rest/action
<?xml version="1.0" encoding="UTF-8" ?>
<result>
  <errorCode>0</errorCode>


Does I have to chaange syntax of this call? Any idea?

Re: Library refresh via API

PostPosted: Fri May 20, 2016 10:39 pm
by zip
It's not changed... and this is not an error, it's an OK response

[SOLVED]Re: Library refresh via API

PostPosted: Sat May 21, 2016 5:53 am
by mackowiakp
I solved problem. There is different response from query:

  Code:
curl -sS -X GET -H "Content-Type: application/xml" http://localhost:23423/rest/library-status


I use it in my script and the response is different from previous version. For sure.
I made necessary changes and now the script works OK.