Hi Florent,
I am not quite sure how to adapt the AT location hint. I tried different combination, with and without the DB name at the end of the URI for the POST request (to evaluate the query), and at the front of the AT location hint. But all combinations return a "[XQST0059] Module not found", and I didn't find the documentation about that on the wiki (I guess I just missed it...)
Good point; the query path is not set to the correct location yet. As I didn't find out how to fix this quickly and cleanly, I've added a GitHub entry:
https://github.com/BaseXdb/basex/issues/256
Your query should work if you put them into the default path, specified by the HTTPPATH variable in .basex, and run it the following way:
http://host:port/rest?run=query.xq
Hope this helps, more questions are welcome, Christian