Make XQuery Great Again!

Let's make Beautiful RESTful Applications on MarkLogic Server with ease using
XQRS: XQuery API for RESTful Web Services

XQRS: XQuery API for RESTful Web Services is a RESTXQ implementation for MarkLogic Server.
It's fast, scales and is light weight at around 1.1k lines of code. You can seamlessly add it to your existing project without it interfering. Support is available on GitHub. RESTXQ enables you to build RESTful services declaratively with XQuery Annotations in the same way as JAX-RS does for Java.

RESTXQ resource functions

Create RESTful Services with URIs that work exactly how you want them to

function get-wheel($wheel-id as xs:string) {

function put-wheel($wheel-id as xs:string, $doc as document-node(element())) {
  xdmp:document-insert($wheel-id, $doc, map:entry("collections", "wheels"))

function list-wheels() {

The RESTXQ standard

Adam Retter introduced the idea of creating RESTful Services in XQuery with Annotations at XML Prague 2012 and then with Christian Grün managed to flesh out the RESTXQ Specification.