Pass base url to the API

Without this the API has no (easy) way of knowing where it's mounted
within the parent application.