On 2 June 2016 at 17:15, Christian GrĂ¼n christian.gruen@gmail.com wrote:
Hi Asxetos,
Here a quick code snippet I put together: http://sprunge.us/jdaZ ( or http://sprunge.us/OZHj?xquery )
If you use db:replace, you should probably specify your document inside the query.
yeah, my guess is that I'd have to serialize the document in some way because it exists on the local filesystem, but not on the remote. So, I am reading the document, but cannot just concat it in the query. It also feels wrong.
However, the REST API may be more appropriate for your scenario. Did you already have a look at our documentation [1]? If you want to send your request via XQuery, you can use the HTTP Module [2].
Yep, the REST API seems to be it. I've already tried it with Postman. And yes, I'll probably use the HTTP xq module. It'd be nice if there was a way trigger a backup with the REST API, but I guess it's not a big deal.
Hope this helps, Christian
[1] http://docs.basex.org/wiki/Developer_Section [2] http://docs.basex.org/wiki/HTTP_Module
bwt, that was a super fast response! Thanks!