Changes

Jump to navigation Jump to search
183 bytes added ,  10:06, 21 January 2020
Additionally, the following '''operations''' can be specified:
* {{Code|query}}: Evaluate an XQuery expression. If a database or database path is specified in the URL, it is used set as initial query context.
* {{Code|command}}: Execute a single [[Commands|database command]].
* {{Code|run}}: Evaluate an XQuery file or command script located on the server. The file path is resolved against the directory specified by {{Option|RESTPATH}} (before, it was resolved against {{Option|WEBPATH}}). Similar to {{Code|query}}, a database or database path is set as context.
; Examples
* Lists all resources found in the '''tmp''' path of the ''factbook'' database:<br/><code>http://localhost:8984/rest/factbook/tmp</code>
 
* Returns the number of documents in a database:<br/><code>http://localhost:8984/rest/database?query=count(.)</code>
* Serializes a document as JSONML:<br/><code>http://localhost:8984/rest/factbook/factbook.xml?method=json&json=format=jsonml</code>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu