Only one of the following '''operations''' can be specified:
* '''query''':
:Evaluates an XPath/XQuery expression.
:If a database or database path is specified in the URL, it is used as query context.* '''run''':
:Runs a query file located on the server.
:The query directory is defined by the <code>[[Options#HTTPPATH|HTTPPATH]]</code> option.* '''command'''::Executes a [[Commands|database command]].
The following parameters can be applied to the '''query''' and '''run''' operations:
* '''wrap''':
:Wraps the results in XML elements (default: <code>no</code>).
* '''Variables''':: all All query parameters prefixed with a dollar sign (<code>$</code>) will be treated as external variables. The parameter name and value will be bound to the query before it is evaluated.* '''[[Serialization]]''':: all serialization parameters known to BaseX can be specified as query parameters. Parameters that are specified within a query will be interpreted by the REST server before the output is generated.
==Request Methods==