This page is part of the [[Developer Section]]. It describes how to use RESTXQ of BaseX.
RESTXQ , specified by [http://www.adamretter.org.uk/ Adam Retter], is a new API for using that facilitates the use of XQuery as a Server Side processing language for the Webwhilst maintaining portability. It has been largely inspired by Java’s[http://en.wikipedia.org/wiki/Java_API_for_RESTful_Web_Services JAX-RSAPI] API , andit defines a pre-defined set of XQuery 3.0 annotations for mapping an HTTP requestrequests to an XQuery functionfunctions. As of {{Version|7.2}}, RESTXQ is supported by BaseX.
=Getting started=
</xml></pre>
=RESTful Annotations=
This section lists all available annotationsprovided by RESTXQ. <code>rest</code> is used as namespace prefix.
==Constraints==
Constraining annotations Constraints restrict the access to functions if specific properties are fulfilled:service requests that a resource function may process.
===Paths===
<code>%rest:path("/a/path/{$with}/some/{$variable}")</code>
if url If a URL matches the given pattern, variables (in curly brackets) will be assigned. The variables serve as input arguments for the function. The type will be converted, as defined by the function.
<!-- TODO how matching works -->