It's a bit clumsy (if the web port is :8081, override it to :8080 for the API requests), but works in our case.