Database Reference
In-Depth Information
A complete example of using the application might look like the following, which
would find the family names of all of the people in all of the documents in the collec‐
tion /db/my-new-collection in the database:
java -jar restserver-client-query/target/
restserver-client-query-1.0-example.jar localhost 8080
"for \$person in //person return \$person/family" /db/my-new-collection admin
On non-Windows platforms, you must escape the $ character used
in XQuery for variables when sending the query in a command line
from the terminal by prefixing with a \ character. If you do not
escape this symbol, the shell interpreter will try to interpret them as
environment variables, which will result in an invalid XQuery and
therefore an HTTP 400 Bad Request response from the REST
Server API.
Remove example. You can execute the RemoveApp example like so:
java -jar restserver-client-remove/target/
restserver-client-remove-1.0-example.jar
This shows the available arguments for using the RemoveApp.
A complete example of using the application might look like the following, which
would remove the collection /db/my-new-collection from the database:
java -jar restserver-client-remove/target/
restserver-client-remove-1.0-example.jar localhost 8080
/db/my-new-collection admin
XML-RPC API
RPC (Remote Procedure Call) allows you to call API functions in eXist from other
processes; these calls are performed over HTTP. The XML aspect of the XML-RPC
protocol indicates that the RPCs and their responses are encoded into XML docu‐
ments, and it is these documents that are sent back and forth between eXist and the
third-party process.
XML-RPC is a standardized protocol, with the XML documents used in requests and
responses being well defined and documented by the XML-RPC specifications . How‐
ever, the definitions of the functions available from eXist that you use in your RPC
calls, their parameters, and their return types naturally differ from those in any other
XML-RPC implementation. The base URI of the XML-RPC server in eXist on a
default installation is http://localhost:8080/exist/xmlrpc .
There is nothing to stop you from using eXist's XML-RPC API from any application
(such as cURL) that can, at a minimum, HTTP POST XML documents to eXist and
Search WWH ::




Custom Search