backported to Jaca 1.6, configurable API_BASE