|-
| '''Examples'''
|The following RESTXQ function can e.g. be called Running a server-side XQuery expression via <code><nowiki>http://localhost:8984/restxq/get.xq?key=user</nowiki></code>:
<pre class="brush:xquery">
module namespace test = 'http://basex.org/examples/test';
import module namespace session = "http://basex.org/modules/session";
declare %restxq:path("/get") %restxq:query-param("key", "{$key}", "") function test:get($key){ 'Value of ' || $key || ': ' || session:attribute($key)};
</pre>
|}