Don’t build the URL yourself, there’s no way to express what you want directly to the view (which doesn’t have a function interpreter for query time and would just think that “now() - 20” is just another string key).
Use the SDK, and Java, to dynamically create the equivalent of
dateToArray(now() - 20) (using
JsonArray as briefly explained before) then to query the view (it will internally build the URL and all that).
Refer to the documentation of the SDK if you need more information on View querying: developer.couchbase.com/documentation/server/4.1/sdks/java-2.2/querying-views.html