Dear Mehdi, Only based on my experience (and not on a strong knowledge about REST), see some answers below. On 04/08/2015 03:00, Mehdi Oulmakki wrote:
Hello everyone,
I am running into issues with getting any information from my instance of Xwiki using the rest API. I'm curling to the site as per this documentation: http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI#HXWikiREST...
Our instance of XWiki responds with a 200 for GET and POST calls (I'm aware of the known issue with PUT) but doesn't actually give us relevant information. The returned data is html for a page with the message:
<div class="panel-body"> <p class="xwikimessage">A problem occurred while trying to process your request. Please contact the webmaster if this happens a gain.</p> </div>
I have four questions concerning this situation:
1. Is the documentation up to date? have there been changes with the REST api in XWiki 7 that aren't reflected there? As far as I know, pretty much up-to-date. I'm using it on a v7 and it works pretty well. Which particular functionality do you use? 2. Are there config settings that need to be set before being able to use the REST api? It should work without any settings. Usually, I run a XWiki and it works (without specific configuration). 3. Should I be concerned that I am getting a simple html instead of the XML the documentation suggests? I usually get an HTML when an error happen (invalid address, wrong authentication, etc.). Try to check also the --header in your Curl. Usually, you have to specify the 'Content-type' for PUT/POST methods and the 'Accept' (application/xml in your case) for GET methods. 4. This is probably the most crucial question: How can I best debug such an issue? all our logs are set to debug, yet I am not seeing any error message related to this. Can you elaborate a bit on what you've did? Jetty? Tomcat? Where did you configure logs? What log are you looking at? NB: I'll can probably not give you advices on the best debug strategy (I never did that) but I guess that these information I ask may be useful for somebody else to answer to you ;-)
I hope this helps.
Thanks in advance,
Mehdi _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org