Updating library data using REST API and Cli
Hello,
First of all I should express my gratuitousness towards zip, for this great piece of software. Secondly, I hope I haven't spammed here with a duplicate question but I really could not find a similar question.
I need to update library data using REST API. I used curl :
which sends a PUT request with the body data from file named "repos". This is the content of this file:
The problem is that serviio receives this request but does not add the items. I see these lines in the log after the request is sent:
but I receive this response from the server :
and the library does not get updated. I'm on serviio version 0.6.2 windows.
Any ideas?
Thanks in advance.
First of all I should express my gratuitousness towards zip, for this great piece of software. Secondly, I hope I haven't spammed here with a duplicate question but I really could not find a similar question.
I need to update library data using REST API. I used curl :
which sends a PUT request with the body data from file named "repos". This is the content of this file:
- Code:
<?xml version="1.0" encoding="UTF-8" ?>
<repository>
<sharedFolders/>
<searchHiddenFiles>false</searchHiddenFiles>
<searchForUpdates>true</searchForUpdates>
<automaticLibraryUpdate>true</automaticLibraryUpdate>
<automaticLibraryUpdateInterval>5</automaticLibraryUpdateInterval>
<onlineRepositories>
<onlineRepository>
<id>116</id>
<repositoryType>FEED</repositoryType>
<contentUrl>http://gdata.youtube.com/feeds/api/users/lengas32/uploads?v=2&max-result=150</contentUrl>
<fileType>VIDEO</fileType>
<repositoryName>Seconds From Disaster</repositoryName>
<enabled>true</enabled>
</onlineRepository>
<onlineRepository>
<id>117</id>
<repositoryType>FEED</repositoryType>
<contentUrl>http://gdata.youtube.com/feeds/api/users/aircrashuploader/uploads?v=2&max-result=150</contentUrl>
<fileType>VIDEO</fileType>
<repositoryName>Air-Crash</repositoryName>
<enabled>true</enabled>
</onlineRepository>
</onlineRepositories>
<maxNumberOfItemsForOnlineFeeds>-1</maxNumberOfItemsForOnlineFeeds>
<onlineFeedExpiryInterval>2</onlineFeedExpiryInterval>
<onlineContentPreferredQuality>HIGH</onlineContentPreferredQuality>
</repository>
The problem is that serviio receives this request but does not add the items. I see these lines in the log after the request is sent:
- Code:
2012-03-31 20:14:53,499 DEBUG [OnlineRepositoryDAOImpl] Reading all OnlineRepositories
2012-03-31 20:14:58,258 DEBUG [RepositoryServerResource] Updating repository with values: OnlineRepository [repoType=FEED, fileType=VIDEO, repositoryUrl=http://gdata.youtube.com/feeds/api/users/lengas32/uploads?v=2&max-result=150, repositoryName=Seconds From Disaster, thumbnailUrl=null]
2012-03-31 20:14:58,258 DEBUG [RepositoryServerResource] Updating repository with values: OnlineRepository [repoType=FEED, fileType=VIDEO, repositoryUrl=http://gdata.youtube.com/feeds/api/users/aircrashuploader/uploads?v=2&max-result=150, repositoryName=Air-Crash, thumbnailUrl=null]
2012-03-31 20:14:58,259 DEBUG [OnlineRepositoryDAOImpl] Reading all OnlineRepositories
2012-03-31 20:14:58,261 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 116)
but I receive this response from the server :
- Code:
<html>
<head>
<title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Internal Server Error</p>
<p>The server encountered an unexpected condition which prevented it from fulfilling the request</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>
and the library does not get updated. I'm on serviio version 0.6.2 windows.
Any ideas?
Thanks in advance.