I hope you can help me I'm going a bit mad with this (I had it working before,
but don't have the notes of what I did).

I have in a database an xml file:


I would like to move the xml file to a different database:


I tried the following:

curl -utest:test -X POST -H "Content-Type: application/xml;charset=UTF-8" -d 
'@/home/hasan/move.xml' -i "http://localhost:8984/rest/test";

where my move.xml has:

<command xmlns="http://basex.org/rest";>
<text> rename test1.xml test-moved/test1.xml </text>

The command returns a 200, but nothing has moved. I am clearly doing something
wrong. If I change the URL in the cURL request to "http://localhost:8984/rest";
I get a java null pointer exception.

Do you know they syntax I should use for the REST API to move a file?

many thanks,

Reply via email to