Hi Luke,
It isn't clear to me how RESTXQ helps with this.
Here is a (very minimal) example how an XQuery endpoint could look like:
declare
%rest:path('{$db}/{$query}')
function rest:execute(
$db as xs:string,
$query as xs:string
) {
xquery:eval(
xs:anyURI($db || '/' || $query),
map { '': db:open($db) }
)
};
One endpoint for all databases would suffice indeed.
Extending the semantics of our REST API would be another option, but
we may need to clarify various questions (will there be an extra
server directory for each database? What happens if people want to
access both global and database-specific queries? etc).
Hope this helps,
Christian