The next request chooses <code>US-ASCII</code> as output encoding and opens the database within the XQuery expression:
:<code>[http://admin:admin@localhost:8984/rest?query=distinct-values(docdb:open('factbook')//religions)&encoding=US-ASCII http://admin:admin@localhost:8984/rest?query=distinct-values(docdb:open('factbook')//religions)&encoding=US-ASCII]</code>
The next URL turns on XML wrapping and lists all database users registered in BaseX: