The resources of a database can be listed by specifying the database, and potential sub directories, in the URL.
In the given example, a single XML document is stored in the ''factbook'' database:
:<code>[http://admin:admin@localhost:8984/rest/factbook http://admin:admin@localhost:8984/rest/factbook]</code>
<pre class="brush:xml">
<rest:database name="factbook" resources="1" xmlns:rest="http://www.basex.org/rest">
<rest:resource type="xml" content-type="application/xml" size="77192">factbook.xml</rest:resource>
</rest:database>
</pre>
GET and POST requests support the following four '''operations''':
* '''Retrieve''':<br/>This is the default typeoperation. It returns a list of all databases, the resources of a database or the resource itself.
* '''Query''':<br/>Evaluates an XPath/XQuery expression. If a database or database path is specified in the URL, it is used as initial query context.
* '''Run''':<br/>Runs a query file located on the server. The query directory is defined by the <code>[[Options (Snapshot)#HTTPPATH|HTTPPATH]]</code> option.